summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorMarko Kenttala <ext-marko.r.kenttala@nokia.com>2012-02-22 14:18:52 +0200
committerQt by Nokia <qt-info@nokia.com>2012-02-28 02:05:40 +0100
commit9eb8fd324e8ab3adfcea4db1e1f2f139ec2ec443 (patch)
treecf088e986198dfa1a8ffdb885354ec90df7d945c /src/gui/text
parentfa713e349cbc452fe52c2375a6d05f6b9a689fb7 (diff)
Fix for Thai characters with a below mark
Some Thai characters with a mark below got drawn under fonts descent causing them to be clipped in some situations. Added checking for this and use of lower offset if needed. Task-Number: ou1cimx1#979179 Change-Id: If9fb643d4dee24342215a637c805d52b78584333 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontengine.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 02536570ef..05e4e9ecbd 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -128,11 +128,17 @@ static void hb_getGlyphMetrics(HB_Font font, HB_Glyph glyph, HB_GlyphMetrics *me
static HB_Fixed hb_getFontMetric(HB_Font font, HB_FontMetric metric)
{
- if (metric == HB_FontAscent) {
- QFontEngine *fe = (QFontEngine *)font->userData;
+ QFontEngine *fe = (QFontEngine *)font->userData;
+ switch (metric) {
+ case HB_FontAscent:
return fe->ascent().value();
+ break;
+ case HB_FontDescent:
+ return fe->descent().value();
+ break;
+ default:
+ return 0;
}
- return 0;
}
HB_Error QFontEngine::getPointInOutline(HB_Glyph glyph, int flags, hb_uint32 point, HB_Fixed *xpos, HB_Fixed *ypos, hb_uint32 *nPoints)