Fix text cut off when halo text width is applied (#373)

* Fix text cut off

* Move characters center.

* Shift glyph position
This commit is contained in:
Kevin Li
2020-05-12 08:26:11 +08:00
committed by GitHub
parent ea7acd6dee
commit 2473dcc691
2 changed files with 3 additions and 3 deletions

View File

@@ -111,8 +111,8 @@ Glyph LocalGlyphRasterizer::rasterizeGlyph(const FontStack& fontStack, GlyphID g
fixedMetrics.metrics.width = size.width;
fixedMetrics.metrics.height = size.height;
fixedMetrics.metrics.left = 3;
fixedMetrics.metrics.top = -10;
fixedMetrics.metrics.left = -2;
fixedMetrics.metrics.top = -5;
fixedMetrics.metrics.advance = 24;
PremultipliedImage rgbaBitmap = impl->drawGlyphBitmap(fontStack, glyphID);