HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prefer list1 (X) to Fcons (X, Qnil) when building lists.
[bpt/emacs.git]
/
src
/
w32uniscribe.c
diff --git
a/src/w32uniscribe.c
b/src/w32uniscribe.c
index
bc45e2c
..
c153c8f
100644
(file)
--- a/
src/w32uniscribe.c
+++ b/
src/w32uniscribe.c
@@
-1,5
+1,5
@@
/* Font backend for the Microsoft W32 Uniscribe API.
/* Font backend for the Microsoft W32 Uniscribe API.
- Copyright (C) 2008-201
2
Free Software Foundation, Inc.
+ Copyright (C) 2008-201
3
Free Software Foundation, Inc.
This file is part of GNU Emacs.
This file is part of GNU Emacs.
@@
-27,7
+27,6
@@
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define _WIN32_WINNT 0x500
#include <windows.h>
#include <usp10.h>
#define _WIN32_WINNT 0x500
#include <windows.h>
#include <usp10.h>
-#include <setjmp.h>
#include "lisp.h"
#include "w32term.h"
#include "lisp.h"
#include "w32term.h"
@@
-334,7
+333,7
@@
uniscribe_shape (Lisp_Object lgstring)
if (NILP (lglyph))
{
if (NILP (lglyph))
{
- lglyph =
Fmake_vector (make_number (LGLYPH_SIZE), Qnil
);
+ lglyph =
LGLYPH_NEW (
);
LGSTRING_SET_GLYPH (lgstring, lglyph_index, lglyph);
}
/* Copy to a 32-bit data type to shut up the
LGSTRING_SET_GLYPH (lgstring, lglyph_index, lglyph);
}
/* Copy to a 32-bit data type to shut up the
@@
-436,8
+435,8
@@
uniscribe_shape (Lisp_Object lgstring)
are zero. */
|| (!attributes[j].fClusterStart && items[i].a.fRTL))
{
are zero. */
|| (!attributes[j].fClusterStart && items[i].a.fRTL))
{
- Lisp_Object vec;
- vec = Fmake_vector (make_number (3), Qnil);
+ Lisp_Object vec
= make_uninit_vector (3)
;
+
if (items[i].a.fRTL)
{
/* Empirically, it looks like Uniscribe
if (items[i].a.fRTL)
{
/* Empirically, it looks like Uniscribe
@@
-454,7
+453,11
@@
uniscribe_shape (Lisp_Object lgstring)
}
else
ASET (vec, 0, make_number (offsets[j].du + adj_offset));
}
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);
/* Based on what ftfont.c does... */
ASET (vec, 2, make_number (advances[j]));
LGLYPH_SET_ADJUSTMENT (lglyph, vec);