blob: 385e6111a631b7791bd7ac3b288d72eb928a066d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
according to bug 345459, this fix for stacking letters from 3.3.8
made it only a lot worse. revert.
--- src/kernel/qfontengine_x11.cpp
+++ src/kernel/qfontengine_x11.cpp
@@ -2672,23 +2655,16 @@ bool QOpenType::positionAndAdd(QShaperIt
// ###### fix the case where we have y advances. How do we handle this in Uniscribe?????
if (positions[i].new_advance) {
item->advances[i] = item->flags & QTextEngine::RightToLeft
- ? -qRound((positions[i].x_advance >> 6)*scale)
+ ? -qRound((positions[i].x_advance >> 6)*scale)
: qRound((positions[i].x_advance >> 6)*scale);
} else {
item->advances[i] += item->flags & QTextEngine::RightToLeft
- ? -qRound((positions[i].x_advance >> 6)*scale)
+ ? -qRound((positions[i].x_advance >> 6)*scale)
: qRound((positions[i].x_advance >> 6)*scale);
}
- int back = 0;
- item->offsets[i].x = qRound((positions[i].x_pos >> 6)*scale);
- item->offsets[i].y = qRound((positions[i].y_pos >> 6)*scale);
- while (positions[i-back].back) {
- back += positions[i - back].back;
- item->offsets[i].x += qRound((positions[i - back].x_pos >> 6)*scale);
- item->offsets[i].y += qRound((positions[i - back].y_pos >> 6)*scale);
- }
- item->offsets[i].y = -item->offsets[i].y;
- back = positions[i].back;
+ item->offsets[i].x = qRound((positions[i].x_pos >> 6)*scale);
+ item->offsets[i].y = -qRound((positions[i].y_pos >> 6)*scale);
+ int back = positions[i].back;
if (item->flags & QTextEngine::RightToLeft) {
while (back--) {
item->offsets[i].x -= item->advances[i-back];
|