diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-01-10 13:11:30 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-01-10 13:11:30 (GMT) |
commit | 3263f8036128cc4403cf6383324f5390eecee13b (patch) | |
tree | 227ea1dfe86b9297cf7808b5b304a039c438e1fe /src/3rdparty | |
parent | 4d53a691aaac9789ddd4f9d4e968d28ace2181ca (diff) | |
parent | 0faab4442040fdfe3790e3c02808fd45993f0265 (diff) | |
download | Qt-3263f8036128cc4403cf6383324f5390eecee13b.zip Qt-3263f8036128cc4403cf6383324f5390eecee13b.tar.gz Qt-3263f8036128cc4403cf6383324f5390eecee13b.tar.bz2 |
Merge branch 'qt-graphics-team-text-master'
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp | 1 | ||||
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp | 41 |
2 files changed, 36 insertions, 6 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp index 4a618da..bbf479e 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp +++ b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp @@ -1683,6 +1683,7 @@ static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool inv } item->glyphs[j] = item->glyphs[i]; item->attributes[j] = item->attributes[i]; + item->advances[j] = item->advances[i]; ++i; ++j; } diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp index ce4d4ac..ef86144 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp @@ -538,8 +538,20 @@ void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item) #ifndef NO_OPENTYPE static const HB_OpenTypeFeature basic_features[] = { { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty }, - { HB_MAKE_TAG('l', 'i', 'g', 'a'), CcmpProperty }, - { HB_MAKE_TAG('c', 'l', 'i', 'g'), CcmpProperty }, + { HB_MAKE_TAG('l', 'i', 'g', 'a'), LigaProperty }, + { HB_MAKE_TAG('c', 'l', 'i', 'g'), CligProperty }, + {0, 0} +}; + +static const HB_OpenTypeFeature disabled_features[] = { + { HB_MAKE_TAG('c', 'p', 'c', 't'), PositioningProperties }, + { HB_MAKE_TAG('h', 'a', 'l', 't'), PositioningProperties }, + // TODO: we need to add certain HB_ShaperFlag for vertical + // writing mode to enable these vertical writing features: + { HB_MAKE_TAG('v', 'a', 'l', 't'), PositioningProperties }, + { HB_MAKE_TAG('v', 'h', 'a', 'l'), PositioningProperties }, + { HB_MAKE_TAG('v', 'k', 'r', 'n'), PositioningProperties }, + { HB_MAKE_TAG('v', 'p', 'a', 'l'), PositioningProperties }, {0, 0} }; #endif @@ -1110,12 +1122,29 @@ HB_Bool HB_SelectScript(HB_ShaperItem *shaper_item, const HB_OpenTypeFeature *fe HB_UInt *feature_tag_list = feature_tag_list_buffer; while (*feature_tag_list) { HB_UShort feature_index; + bool skip = false; if (*feature_tag_list == HB_MAKE_TAG('k', 'e', 'r', 'n')) { - if (face->current_flags & HB_ShaperFlag_NoKerning) { - ++feature_tag_list; - continue; + if (face->current_flags & HB_ShaperFlag_NoKerning) + skip = true; + else + face->has_opentype_kerning = true; + } + features = disabled_features; + while (features->tag) { + if (*feature_tag_list == features->tag) { + skip = true; + break; } - face->has_opentype_kerning = true; + ++features; + } + // 'palt' should be turned off by default unless 'kern' is on + if (!face->has_opentype_kerning && + *feature_tag_list == HB_MAKE_TAG('p', 'a', 'l', 't')) + skip = true; + + if (skip) { + ++feature_tag_list; + continue; } error = HB_GPOS_Select_Feature(face->gpos, *feature_tag_list, script_index, 0xffff, &feature_index); if (!error) |