X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Ftext%2Ftext-abstraction%2Fplugin%2Ffont-face-cache-item.cpp;h=d017695d322e54e5ceed37847c390407d461a6e2;hb=a932dd3114e4dd69aed3a3760b7ca13ea9226a58;hp=5608b03a24846c1be148f3f3e08909bfba7cca62;hpb=2efb8062fbb62dc1afce4fb3ee2466e3fbc97fb7;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git 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 5608b03..d017695 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 @@ -117,7 +117,14 @@ bool FontFaceCacheItem::GetGlyphMetrics(GlyphInfo& glyph, unsigned int dpiVertic glyph.height = mFixedHeightPixels; glyph.advance = mFixedWidthPixels; glyph.xBearing = 0.0f; - glyph.yBearing = mFixedHeightPixels; + if(horizontal) + { + glyph.yBearing += static_cast(ftFace->glyph->metrics.horiBearingY) * FROM_266; + } + else + { + glyph.yBearing += static_cast(ftFace->glyph->metrics.vertBearingY) * FROM_266; + } // Adjust the metrics if the fixed-size font should be down-scaled const float desiredFixedSize = static_cast(mRequestedPointSize) * FROM_266 / POINTS_PER_INCH * dpiVertical;