summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-03-30 11:25:13 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2013-03-30 11:25:13 +0000
commitdf0d4282c47241c0d155e8804cdd5fe8ae7399ac (patch)
treed41818692deeeb9d9c7ff5c2798c09a6f76429e0 /Build/source
parent4c195d681d16566fba4d1f6fd73b3d84c9052a2e (diff)
Some XeTeX updates
git-svn-id: svn://tug.org/texlive/trunk@29559 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp6
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeX_ext.c10
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeX_ext.h3
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeX_mac.c8
-rw-r--r--Build/source/texk/web2c/xetexdir/xetex.h2
5 files changed, 15 insertions, 14 deletions
diff --git a/Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp b/Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp
index 218843c2740..676759a0cc4 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp
+++ b/Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp
@@ -106,12 +106,16 @@ _get_glyph_advance(FT_Face face, FT_UInt gid, bool vertical)
if (vertical)
flags |= FT_LOAD_VERTICAL_LAYOUT;
- error = FT_Get_Advance(face, gid, ftLoadFlags, &advance);
+ error = FT_Get_Advance(face, gid, flags, &advance);
if (error)
advance = 0;
else
advance = advance >> 10;
+ /* FreeType's vertical metrics grows downward */
+ if (vertical)
+ advance = -advance;
+
return advance;
}
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
index 4a53cdac119..cc27215426c 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
+++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
@@ -2902,16 +2902,6 @@ makeutf16name()
}
-int getcpcode(int fontNum, unsigned int code, int side)
-{
- return get_cp_code(fontNum, code, side);
-}
-
-void setcpcode(int fontNum, unsigned int code, int side, int value)
-{
- set_cp_code(fontNum, code, side, value);
-}
-
integer get_native_word_cp(void* pNode, int side)
{
memoryword* node = (memoryword*)pNode;
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.h b/Build/source/texk/web2c/xetexdir/XeTeX_ext.h
index 9faf51cc519..d5cb931c692 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.h
+++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.h
@@ -281,6 +281,9 @@ typedef void* CFDictionaryRef; /* dummy declaration just so the stubs can compil
/* the metrics params here are really TeX 'scaled' (or MacOS 'Fixed') values, but that typedef isn't available every place this is included */
void aatgetfontmetrics(CFDictionaryRef attrs, integer* ascent, integer* descent, integer* xheight, integer* capheight, integer* slant);
+ void set_cp_code(int fontNum, unsigned int code, int side, int value);
+ int get_cp_code(int fontNum, unsigned int code, int side);
+
#ifdef XETEX_MAC
/* functions in XeTeX_mac.c */
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_mac.c b/Build/source/texk/web2c/xetexdir/XeTeX_mac.c
index 44a45692d4b..fca095e2b36 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeX_mac.c
+++ b/Build/source/texk/web2c/xetexdir/XeTeX_mac.c
@@ -882,12 +882,14 @@ find_pic_file(char** path, realrect* bounds, int pdfBoxType, int page)
CFNumberRef DPIWidth = CFDictionaryGetValue(properties, kCGImagePropertyDPIWidth);
CFNumberRef DPIHeight = CFDictionaryGetValue(properties, kCGImagePropertyDPIHeight);
- if (imageWidth && imageHeight && DPIWidth && DPIHeight) {
+ if (imageWidth && imageHeight) {
int w = 0, h = 0, hRes = 72, vRes = 72;
CFNumberGetValue(imageWidth, kCFNumberIntType, &w);
CFNumberGetValue(imageHeight, kCFNumberIntType, &h);
- CFNumberGetValue(DPIWidth, kCFNumberIntType, &hRes);
- CFNumberGetValue(DPIHeight, kCFNumberIntType, &vRes);
+ if (DPIWidth)
+ CFNumberGetValue(DPIWidth, kCFNumberIntType, &hRes);
+ if (DPIHeight)
+ CFNumberGetValue(DPIHeight, kCFNumberIntType, &vRes);
bounds->x = 0;
bounds->y = 0;
diff --git a/Build/source/texk/web2c/xetexdir/xetex.h b/Build/source/texk/web2c/xetexdir/xetex.h
index 5e990bc7c05..ebce1151bff 100644
--- a/Build/source/texk/web2c/xetexdir/xetex.h
+++ b/Build/source/texk/web2c/xetexdir/xetex.h
@@ -58,6 +58,8 @@ authorization from the copyright holders.
#define makexdvglypharraydata(p) makeXDVGlyphArrayData(&(mem[p]))
#define xdvbufferbyte(i) xdvbuffer[i]
+#define getcpcode get_cp_code
+#define setcpcode set_cp_code
#define getnativewordcp(p,s) get_native_word_cp(&(mem[p]), s)
#define pic_node_size 8