skia2/tools/fonts
Ben Wagner 668995122f Fix when a glyph has a path
Always call generateMetrics before generatePath so that generateMetrics
can determine which glyph representation to use and if that glyph
representation can be modeled as a path.

Pass an allocator into generateMetrics so that it can set the path to
not existing. This allows generatePath to continue to work as it used
to, creating a path if any path is available. However, generateMetrics
may first set the path to not existing.

Update getPath and internalGetPath to use the path on the glyph if it
has already been set. Update makeGlyph and internalMakeGlyph to always
call generateMetrics first (which is now more like initGlyph).

Update the SkGlyph::PathData to indicate that it is a dev-path and not a
user-path. A user-path will have effects applied to it. A dev-path is
always a resolved path which is always filled -- unless it is hairline.

Update everything else for the knock on effects and to take advantage of
this information.

Bug: chromium:1266022
Change-Id: Id3f3cf5a534ab99f3a5779c910c1d1e191e68b1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/478658
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-12-07 14:58:29 +00:00
..
BUILD.bazel [bazel] Try adding cc_binary rules that use generated rules 2021-11-30 18:18:53 +00:00
create_test_font_color.cpp Reland "Fix compilation w/ "skia_enable_svg = false" (take 2)" 2021-09-01 17:54:08 +00:00
create_test_font.cpp Move SkSpan to include/, for use in public API 2021-05-12 13:19:32 +00:00
generate_fir_coeff.py Fix Python3 compatibility 2021-03-25 14:15:35 +00:00
RandomScalerContext.cpp Fix when a glyph has a path 2021-12-07 14:58:29 +00:00
RandomScalerContext.h Serialize foreground color caching requirement specialisation 2021-11-03 19:56:47 +00:00
test_font_index.inc
test_font_monospace.inc
test_font_sans_serif.inc
test_font_serif.inc
TestEmptyTypeface.h Serialize foreground color caching requirement specialisation 2021-11-03 19:56:47 +00:00
TestFontMgr.cpp [bazel] Try adding cc_binary rules that use generated rules 2021-11-30 18:18:53 +00:00
TestFontMgr.h
TestSVGTypeface.cpp Fix when a glyph has a path 2021-12-07 14:58:29 +00:00
TestSVGTypeface.h Serialize foreground color caching requirement specialisation 2021-11-03 19:56:47 +00:00
TestTypeface.cpp Fix when a glyph has a path 2021-12-07 14:58:29 +00:00
TestTypeface.h Serialize foreground color caching requirement specialisation 2021-11-03 19:56:47 +00:00
ToolUtilsFont.cpp