[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109842: Further fix for bug #11860 w
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109842: Further fix for bug #11860 with Arabic display on Windows. |
Date: |
Sat, 01 Sep 2012 16:54:27 +0300 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109842
fixes bug: http://debbugs.gnu.org/11860
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2012-09-01 16:54:27 +0300
message:
Further fix for bug #11860 with Arabic display on Windows.
src/w32uniscribe.c (uniscribe_shape): Handle correctly the case of
more than one grapheme cluster passed to the shaper: compute the
offset adjustment values separately for each cluster.
modified:
src/ChangeLog
src/w32uniscribe.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-09-01 12:23:50 +0000
+++ b/src/ChangeLog 2012-09-01 13:54:27 +0000
@@ -1,5 +1,9 @@
2012-09-01 Eli Zaretskii <address@hidden>
+ * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
+ more than one grapheme cluster passed to the shaper: compute the
+ offset adjustment values separately for each cluster. (Bug#11860)
+
* image.c: Restore mistakenly removed inclusion of w32.h. Without
it, GCC doesn't see prototypes of w32_delayed_load, and complains
about implicit conversions from integer to pointer.
=== modified file 'src/w32uniscribe.c'
--- a/src/w32uniscribe.c 2012-08-21 17:14:08 +0000
+++ b/src/w32uniscribe.c 2012-09-01 13:54:27 +0000
@@ -322,22 +322,6 @@
{
int j, from, to, adj_offset = 0;
- /* For RTL text, the Uniscribe shaper prepares the
- values in ADVANCES array for layout in reverse order,
- whereby "advance width" is applied to move the pen in
- reverse direction and _before_ drawing the glyph.
- Since we draw glyphs in their normal left-to-right
- order, we need to adjust the coordinates of each
- non-base glyph in a grapheme cluster via X-OFF
- component of the gstring's ADJUSTMENT sub-vector.
- This loop computes the initial value of the
- adjustment for the base character, which is then
- updated for each successive glyph in the grapheme
- cluster. */
- if (items[i].a.fRTL)
- for (j = 1; j < nglyphs; j++)
- adj_offset += advances[j];
-
from = 0;
to = from;
@@ -380,6 +364,32 @@
}
}
}
+
+ /* For RTL text, the Uniscribe shaper prepares
+ the values in ADVANCES array for layout in
+ reverse order, whereby "advance width" is
+ applied to move the pen in reverse direction
+ and _before_ drawing the glyph. Since we
+ draw glyphs in their normal left-to-right
+ order, we need to adjust the coordinates of
+ each non-base glyph in a grapheme cluster via
+ X-OFF component of the gstring's ADJUSTMENT
+ sub-vector. This loop computes, for each
+ grapheme cluster, the initial value of the
+ adjustment for the base character, which is
+ then updated for each successive glyph in the
+ grapheme cluster. */
+ if (items[i].a.fRTL)
+ {
+ int j1 = j;
+
+ adj_offset = 0;
+ while (j1 < nglyphs && !attributes[j1].fClusterStart)
+ {
+ adj_offset += advances[j1];
+ j1++;
+ }
+ }
}
LGLYPH_SET_CHAR (lglyph, chars[items[i].iCharPos
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109842: Further fix for bug #11860 with Arabic display on Windows.,
Eli Zaretskii <=