[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: qt-copy/src/kernel
From: Lars Knoll <knoll () kde ! org>
Date: 2003-05-22 15:02:54
[Download RAW message or body]
CVS commit by knoll:
fix arabic mark placement.
M +13 -5 qscriptengine.cpp 1.2
--- qt-copy/src/kernel/qscriptengine.cpp #1.1:1.2
@@ -386,6 +386,6 @@ enum Shape {
XIsolated,
XFinal,
- XMedial,
- XInitial
+ XInitial,
+ XMedial
};
@@ -443,5 +443,4 @@ static inline bool nextLogicalCharJoins(
static inline Shape glyphVariantLogical( const QString &str, int pos)
{
- // ignores L1 - L3, ligatures are job of the codec
QChar::Joining joining = ::joining( str.unicode()[pos] );
//qDebug("checking %x, joining=%d", str[pos].unicode(), joining);
@@ -938,5 +937,7 @@ static void arabicSyriacOpenTypeShape( i
}
- openType->applyGPOSFeatures();
+ // ### gpos positioning often fails for arabic. Our heuristics are better!
+ // use this instead of open type positioning
+// openType->applyGPOSFeatures();
si->num_glyphs = 0;
openType->appendTo(engine, si);
@@ -971,5 +972,7 @@ static void arabic_shape( int /*script*/
QTextEngine *engine, QScriptItem *si )
{
-#if defined( Q_WS_X11) && !defined( QT_NO_XFTFREETYPE )
+ // ### disable open typ for arabic for now. It has some bigger trouble with
+ // non spacing marks.
+#if 0 && defined( Q_WS_X11) && !defined( QT_NO_XFTFREETYPE )
QOpenType *openType = si->fontEngine->openType();
@@ -992,4 +995,9 @@ static void arabic_shape( int /*script*/
convertToCMap( shapedChars, slen, engine, si );
+ advance_t *advances = engine->advances(si);
+ for (int i = 0; i < slen; ++i)
+ if (glyphAttributes[i].mark)
+ advances[i] = 0;
+
::free( shapedChars );
q_heuristicPosition( engine, si );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic