summaryrefslogtreecommitdiffstats
path: root/src/kernel/tqscriptengine_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/tqscriptengine_x11.cpp')
-rw-r--r--src/kernel/tqscriptengine_x11.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/kernel/tqscriptengine_x11.cpp b/src/kernel/tqscriptengine_x11.cpp
index 6d5429cb0..c54f6d6b1 100644
--- a/src/kernel/tqscriptengine_x11.cpp
+++ b/src/kernel/tqscriptengine_x11.cpp
@@ -69,12 +69,13 @@ static bool thaana_shape(TQShaperItem *item)
if (openType && openType->supportsScript(item->script)) {
openType->selectScript(TQFont::Thaana);
+ const int availableGlyphs = item->num_glyphs;
if (item->font->stringToCMap(item->string->unicode()+item->from, item->length, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
return false;
heuristicSetGlyphAttributes(item);
openType->shape(item);
- return openType->positionAndAdd(item);
+ return openType->positionAndAdd(item, availableGlyphs);
}
#endif
return basic_shape(item);
@@ -1550,6 +1551,9 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
reph = i;
}
+#ifndef TQT_NO_XFTFREETYPE
+ const int availableGlyphs = item->num_glyphs;
+#endif
if (item->font->stringToCMap((const TQChar *)reordered.data(), len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
return false;
@@ -1694,7 +1698,7 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
}
}
- if (!openType->positionAndAdd(item, false))
+ if (!openType->positionAndAdd(item, availableGlyphs, false))
return false;
if (control) {
@@ -2056,6 +2060,9 @@ static bool tibetan_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
str = (TQChar *)reordered.data();
}
+#ifndef TQT_NO_XFTFREETYPE
+ const int availableGlyphs = item->num_glyphs;
+#endif
if (item->font->stringToCMap(str, len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
return false;
@@ -2075,7 +2082,7 @@ static bool tibetan_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
openType->selectScript(TQFont::Tibetan, tibetan_features);
openType->shape(item);
- if (!openType->positionAndAdd(item, false))
+ if (!openType->positionAndAdd(item, availableGlyphs, false))
return false;
}
#endif
@@ -2708,6 +2715,9 @@ static bool khmer_shape_syllable(TQOpenType *openType, TQShaperItem *item)
} // switch
} // for
+#ifndef TQT_NO_XFTFREETYPE
+ const int availableGlyphs = item->num_glyphs;
+#endif
if (item->font->stringToCMap((const TQChar *)reordered, len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
return false;
@@ -2745,7 +2755,7 @@ static bool khmer_shape_syllable(TQOpenType *openType, TQShaperItem *item)
}
openType->shape(item, where);
- if (!openType->positionAndAdd(item, false))
+ if (!openType->positionAndAdd(item, availableGlyphs, false))
return false;
} else
#endif
@@ -3215,6 +3225,9 @@ static bool myanmar_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
len += 2;
}
+#ifndef TQT_NO_XFTFREETYPE
+ const int availableGlyphs = item->num_glyphs;
+#endif
if (item->font->stringToCMap((const TQChar *)reordered, len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
return false;
@@ -3252,7 +3265,7 @@ static bool myanmar_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
}
openType->shape(item, where);
- if (!openType->positionAndAdd(item, false))
+ if (!openType->positionAndAdd(item, availableGlyphs, false))
return false;
} else
#endif
@@ -3499,6 +3512,9 @@ static bool hangul_shape_syllable(TQOpenType *openType, TQShaperItem *item)
len = 1;
}
+#ifndef TQT_NO_XFTFREETYPE
+ const int availableGlyphs = item->num_glyphs;
+#endif
if (item->font->stringToCMap(ch, len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
return false;
@@ -3519,7 +3535,7 @@ static bool hangul_shape_syllable(TQOpenType *openType, TQShaperItem *item)
item->log_clusters = logClusters.data();
openType->shape(item);
- if (!openType->positionAndAdd(item, false))
+ if (!openType->positionAndAdd(item, availableGlyphs, false))
return false;
}