#145421 Fix glyph padding in STB atlas impl. (flutter/engine#51585)

See the associated issue for description and screenshots.

Fixes issue #145421 [as described here.](https://github.com/flutter/flutter/issues/145421)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
John O'Neil
2024-04-04 13:06:02 -07:00
committed by GitHub
parent cb29abbd20
commit 75fb13d333

View File

@@ -220,8 +220,7 @@ static void DrawGlyph(BitmapSTB* bitmap,
// Glyph in place
if (!has_color || DISABLE_COLOR_FONT_SUPPORT) {
stbtt_MakeGlyphBitmap(typeface_stb->GetFontInfo(), output,
location.GetWidth() - kPadding,
location.GetHeight() - kPadding,
location.GetWidth(), location.GetHeight(),
bitmap->GetRowBytes(), scale_x, scale_y, glyph.index);
} else {
// But for color bitmaps we need to get the glyph pixels and then carry all