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:
parent
335a1d0454
commit
d727f04dd1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user