From 049a4f09e28ed2997376a5014a47fd790977389c Mon Sep 17 00:00:00 2001 From: Bowon Ryu Date: Thu, 15 Jun 2023 14:56:36 +0900 Subject: [PATCH] [Tizen] Fix small font size text layout issue Previously, text always rounded down the advance to upload it in the pixel buffer. but this caused a issue where certain glyphs appeared too close together when the font size was very small. Now, rounding the advance values for a more natural layout. Change-Id: I35c3138c59e3cc8b9418ac448d256e83e33046b0 Signed-off-by: Bowon Ryu --- dali/internal/text/text-abstraction/plugin/font-face-cache-item.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/dali/internal/text/text-abstraction/plugin/font-face-cache-item.cpp b/dali/internal/text/text-abstraction/plugin/font-face-cache-item.cpp index 90fbb02..6ad5c96 100644 --- a/dali/internal/text/text-abstraction/plugin/font-face-cache-item.cpp +++ b/dali/internal/text/text-abstraction/plugin/font-face-cache-item.cpp @@ -308,6 +308,7 @@ bool FontFaceCacheItem::GetGlyphMetrics(GlyphInfo& glyphInfo, unsigned int dpiVe glyphInfo.xBearing += static_cast(metrics.vertBearingX) * FROM_266; glyphInfo.yBearing += static_cast(metrics.vertBearingY) * FROM_266; } + glyphInfo.advance = round(glyphInfo.advance); const bool isEmboldeningRequired = glyphInfo.isBoldRequired && !(glyphData.mStyleFlags & FT_STYLE_FLAG_BOLD); if(isEmboldeningRequired) -- 2.7.4