]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix display of Arabic diacriticals on Windows, per bug #11860.
authorEli Zaretskii <eliz@gnu.org>
Tue, 4 Sep 2012 17:15:45 +0000 (20:15 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 4 Sep 2012 17:15:45 +0000 (20:15 +0300)
 src/w32uniscribe.c (uniscribe_shape): Reverse the sign of
 offsets[j].dv, since the y axis of the screen coordinates points
 down, while the y axis of the font definition coordinates points
 up.  This fixes display of Arabic diacritics such as KASRA and
 KASRATAN.

src/ChangeLog
src/w32uniscribe.c

index a8d6a4026a0b9af18fac35d3188fa1ce93c99580..f905cc3b5a2d2dfa9a1aae7d8c3f758a8e1d5331 100644 (file)
@@ -1,3 +1,11 @@
+2012-09-04  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32uniscribe.c (uniscribe_shape): Reverse the sign of
+       offsets[j].dv, since the y axis of the screen coordinates points
+       down, while the y axis of the font definition coordinates points
+       up.  This fixes display of Arabic diacritics such as KASRA and
+       KASRATAN.  (Bug#11860)
+
 2012-09-04  Paul Eggert  <eggert@cs.ucla.edu>
 
        Be more systematic about _setjmp vs setjmp.
index bc45e2c648c9c9ad29ab7e5a0d391c48f325b581..cf99d14dc77a55a3714630f62bd9b1001bbd4973 100644 (file)
@@ -454,7 +454,11 @@ uniscribe_shape (Lisp_Object lgstring)
                        }
                      else
                        ASET (vec, 0, make_number (offsets[j].du + adj_offset));
-                     ASET (vec, 1, make_number (offsets[j].dv));
+                     /* In the font definition coordinate system, the
+                        Y coordinate points up, while in our screen
+                        coordinates Y grows downwards.  So we need to
+                        reverse the sign of Y-OFFSET here.  */
+                     ASET (vec, 1, make_number (-offsets[j].dv));
                      /* Based on what ftfont.c does... */
                      ASET (vec, 2, make_number (advances[j]));
                      LGLYPH_SET_ADJUSTMENT (lglyph, vec);