From: Bowon Ryu Date: Thu, 15 Jun 2023 05:56:36 +0000 (+0900) Subject: [Tizen] Fix small font size text layout issue X-Git-Tag: accepted/tizen/7.0/unified/20240207.172838~2^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=049a4f09e28ed2997376a5014a47fd790977389c [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 --- 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)