FreeType bitmap glyphs never have a path.

If a glyph is to be drawn from a bitmap, preemptively mark it as not
having any path. This prevents attempts to fake bold or draw large
`sbix` glyphs from paths.

Change-Id: I2959f18e70f29b13ca198a710dffc88a249c73d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517617
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
Ben Wagner 2022-03-08 00:03:31 -05:00 committed by SkCQ
parent 335a1d0454
commit d727f04dd1

View File

@ -1298,6 +1298,8 @@ void SkScalerContext_FreeType::generateMetrics(SkGlyph* glyph, SkArenaAlloc* all
updateGlyphIfLCD(glyph);
} else if (fFace->glyph->format == FT_GLYPH_FORMAT_BITMAP) {
glyph->setPath(alloc, nullptr, false);
if (this->isVertical()) {
FT_Vector vector;
vector.x = fFace->glyph->metrics.vertBearingX - fFace->glyph->metrics.horiBearingX;