From 75fb13d3335252be14217d0961d7eb74f4f8d956 Mon Sep 17 00:00:00 2001 From: John O'Neil Date: Thu, 4 Apr 2024 13:06:02 -0700 Subject: [PATCH] #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 --- .../typographer/backends/stb/typographer_context_stb.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/engine/src/flutter/impeller/typographer/backends/stb/typographer_context_stb.cc b/engine/src/flutter/impeller/typographer/backends/stb/typographer_context_stb.cc index 6c5bcad667..ffcda77027 100644 --- a/engine/src/flutter/impeller/typographer/backends/stb/typographer_context_stb.cc +++ b/engine/src/flutter/impeller/typographer/backends/stb/typographer_context_stb.cc @@ -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