[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/khtml/rendering
From: Charles Samuels <charles () kde ! org>
Date: 2008-02-03 23:42:32
Message-ID: 1202082152.184256.14552.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 770550 by charles:
support bidirectional override in both directions. Duh
M +9 -6 font.cpp
--- trunk/KDE/kdelibs/khtml/rendering/font.cpp #770549:770550
@@ -69,14 +69,17 @@
int x, int y, const QString &str)
{
QString qs = str;
- if (d == Qt::RightToLeft)
+ // Qt doesn't have a function to force a direction,
+ // so we have to use a the unicode "RTO" character to
+ // (no, setLayoutDirection isn't enough)
+ if (d == Qt::RightToLeft && str[0].direction() == QChar::DirL)
{
- // Qt doesn't have a function to force a direction,
- // so we have to use a the unicode "RTO" character to
- // (no, setLayoutDirection isn't enough)
- if (str[0].direction() == QChar::DirL)
- qs.prepend(QChar(0x202E));
+ qs.prepend(QChar(0x202E)); // RIGHT-TO-LEFT OVERRIDE
}
+ else if (d == Qt::LeftToRight && str[0].direction() == QChar::DirR)
+ {
+ qs.prepend(QChar(0x202D)); // LEFT-TO-RIGHT OVERRIDE
+ }
Qt::LayoutDirection saveDir = p->layoutDirection();
p->setLayoutDirection(d);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic