summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorMarko Kenttala <ext-marko.r.kenttala@nokia.com>2012-02-22 12:18:52 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-02-28 01:05:40 (GMT)
commit9eb8fd324e8ab3adfcea4db1e1f2f139ec2ec443 (patch)
treecf088e986198dfa1a8ffdb885354ec90df7d945c /src/3rdparty
parentfa713e349cbc452fe52c2375a6d05f6b9a689fb7 (diff)
downloadQt-9eb8fd324e8ab3adfcea4db1e1f2f139ec2ec443.zip
Qt-9eb8fd324e8ab3adfcea4db1e1f2f139ec2ec443.tar.gz
Qt-9eb8fd324e8ab3adfcea4db1e1f2f139ec2ec443.tar.bz2
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/3rdparty')
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp5
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
index af0ee52..48e9064 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
@@ -344,6 +344,11 @@ static inline void positionCluster(HB_ShaperItem *item, int gfrom, int glast)
}
+ // Check drawing below fonts descent
+ if (cmb == HB_Combining_Below || cmb == HB_Combining_BelowRight)
+ if ((markMetrics.height + offset) > item->font->klass->getFontMetric(item->font, HB_FontDescent))
+ offset = markMetrics.y; // Use offset from mark metrics so it won't get drawn below descent
+
// combining marks of different class don't interact. Reset the rectangle.
if (cmb != lastCmb) {
//qDebug("resetting rect");
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
index 470e27b..b3f5226 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
@@ -231,7 +231,8 @@ typedef struct {
} HB_GlyphMetrics;
typedef enum {
- HB_FontAscent
+ HB_FontAscent,
+ HB_FontDescent
} HB_FontMetric;
typedef struct {