summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2012-10-22 21:34:56 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2012-10-22 21:34:56 +0000
commit6425ad045e76ce8ab5a7ee5cf0c9bbad4671b877 (patch)
tree03b64e5d97f63734b7db6c87a8934bbd446a80c3 /Build
parent6b265b5706ebc12aa2be12a344f851d69dc237d7 (diff)
Merge changes from XeTeX repository
git-svn-id: svn://tug.org/texlive/trunk@28044 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/xetexdir/ChangeLog5
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp12
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeXOTMath.cpp33
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeXOTMath.h34
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeX_ext.c5
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeX_ext.h1
-rw-r--r--Build/source/texk/web2c/xetexdir/xetex.ch17
-rw-r--r--Build/source/texk/web2c/xetexdir/xetex.h92
8 files changed, 111 insertions, 88 deletions
diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog
index a5c1b0ff1ac..b98e2af8e00 100644
--- a/Build/source/texk/web2c/xetexdir/ChangeLog
+++ b/Build/source/texk/web2c/xetexdir/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-22 Khaled Hosny <khaledhosny@eglug.org>
+
+ * XeTeXFontInst.cpp, XeTeXOTMath.cpp, XeTeXOTMath.h, XeTeX_ext.c,
+ XeTeX_ext.h, xetex.ch, xetex.h: Merge changes from XeTeX repository.
+
2012-09-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* XeTeX_ext.c (open_dvi_output): sync with W32TeX. On Windows,
diff --git a/Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp b/Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp
index 33ee8336534..97da466ba48 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp
+++ b/Build/source/texk/web2c/xetexdir/XeTeXFontInst.cpp
@@ -260,8 +260,10 @@ XeTeXFontInst::getGlyphHeightDepth(LEGlyphID gid, float* ht, float* dp)
GlyphBBox bbox;
getGlyphBounds(gid, &bbox);
- *ht = bbox.yMax;
- *dp = -bbox.yMin;
+ if (ht)
+ *ht = bbox.yMax;
+ if (dp)
+ *dp = -bbox.yMin;
}
void
@@ -273,8 +275,10 @@ XeTeXFontInst::getGlyphSidebearings(LEGlyphID gid, float* lsb, float* rsb)
GlyphBBox bbox;
getGlyphBounds(gid, &bbox);
- *lsb = bbox.xMin;
- *rsb = adv.fX - bbox.xMax;
+ if (lsb)
+ *lsb = bbox.xMin;
+ if (rsb)
+ *rsb = adv.fX - bbox.xMax;
}
float
diff --git a/Build/source/texk/web2c/xetexdir/XeTeXOTMath.cpp b/Build/source/texk/web2c/xetexdir/XeTeXOTMath.cpp
index ff5c540b118..0374cb4cf40 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeXOTMath.cpp
+++ b/Build/source/texk/web2c/xetexdir/XeTeXOTMath.cpp
@@ -30,7 +30,6 @@ use or other dealings in this Software without prior written
authorization from the copyright holders.
\****************************************************************************/
-#define XETEX_OT_MATH_IMPLEMENTATION 1
#include "XeTeXOTMath.h"
#include "XeTeX_ext.h"
@@ -76,7 +75,7 @@ static SInt16 getMathConstant(LEFontInstance* fontInst, mathConstantIndex whichC
}
int
-getotmathconstant(int f, int n)
+get_ot_math_constant(int f, int n)
{
int rval = 0;
@@ -136,7 +135,7 @@ const mathConstantIndex TeX_sym_to_OT_map[] = {
};
int
-getnativemathsyparam(int f, int n)
+get_native_mathsy_param(int f, int n)
{
int rval = 0;
@@ -146,7 +145,7 @@ getnativemathsyparam(int f, int n)
if (n < sizeof(TeX_sym_to_OT_map) / sizeof(mathConstantIndex)) {
mathConstantIndex ot_index = TeX_sym_to_OT_map[n];
if (ot_index != unknown)
- rval = getotmathconstant(f, (int)ot_index);
+ rval = get_ot_math_constant(f, (int)ot_index);
}
}
// fprintf(stderr, " math_sy(%d, %d) returns %.3f\n", f, n, Fix2X(rval));
@@ -180,7 +179,7 @@ const mathConstantIndex TeX_ext_to_OT_map[] = {
};
int
-getnativemathexparam(int f, int n)
+get_native_mathex_param(int f, int n)
{
int rval = 0;
@@ -190,7 +189,7 @@ getnativemathexparam(int f, int n)
if (n < sizeof(TeX_ext_to_OT_map) / sizeof(mathConstantIndex)) {
mathConstantIndex ot_index = TeX_ext_to_OT_map[n];
if (ot_index != unknown)
- rval = getotmathconstant(f, (int)ot_index);
+ rval = get_ot_math_constant(f, (int)ot_index);
}
}
// fprintf(stderr, " math_ex(%d, %d) returns %.3f\n", f, n, Fix2X(rval));
@@ -199,7 +198,7 @@ getnativemathexparam(int f, int n)
}
int
-getotmathvariant(int f, int g, int v, integer* adv, int horiz)
+get_ot_math_variant(int f, int g, int v, integer* adv, int horiz)
{
int rval = g;
*adv = -1;
@@ -239,7 +238,7 @@ getotmathvariant(int f, int g, int v, integer* adv, int horiz)
}
void*
-getotassemblyptr(int f, int g, int horiz)
+get_ot_assembly_ptr(int f, int g, int horiz)
{
void* rval = NULL;
@@ -276,7 +275,7 @@ getotassemblyptr(int f, int g, int horiz)
}
int
-getotmathitalcorr(int f, int g)
+get_ot_math_ital_corr(int f, int g)
{
int rval = 0;
@@ -311,7 +310,7 @@ getotmathitalcorr(int f, int g)
}
int
-getotmathaccentpos(int f, int g)
+get_ot_math_accent_pos(int f, int g)
{
int rval = 0x7fffffffUL;
@@ -348,7 +347,7 @@ getotmathaccentpos(int f, int g)
}
int
-otminconnectoroverlap(int f)
+ot_min_connector_overlap(int f)
{
int rval = 0;
@@ -371,25 +370,25 @@ otminconnectoroverlap(int f)
}
int
-otpartcount(const GlyphAssembly* a)
+ot_part_count(const GlyphAssembly* a)
{
return SWAPW(a->partCount);
}
int
-otpartglyph(const GlyphAssembly* a, int i)
+ot_part_glyph(const GlyphAssembly* a, int i)
{
return SWAPW(a->partRecords[i].glyph);
}
int
-otpartisextender(const GlyphAssembly* a, int i)
+ot_part_is_extender(const GlyphAssembly* a, int i)
{
return (SWAPW(a->partRecords[i].partFlags) & fExtender) != 0;
}
int
-otpartstartconnector(int f, const GlyphAssembly* a, int i)
+ot_part_start_connector(int f, const GlyphAssembly* a, int i)
{
int rval = 0;
@@ -402,7 +401,7 @@ otpartstartconnector(int f, const GlyphAssembly* a, int i)
}
int
-otpartendconnector(int f, const GlyphAssembly* a, int i)
+ot_part_end_connector(int f, const GlyphAssembly* a, int i)
{
int rval = 0;
@@ -415,7 +414,7 @@ otpartendconnector(int f, const GlyphAssembly* a, int i)
}
int
-otpartfulladvance(int f, const GlyphAssembly* a, int i)
+ot_part_full_advance(int f, const GlyphAssembly* a, int i)
{
int rval = 0;
diff --git a/Build/source/texk/web2c/xetexdir/XeTeXOTMath.h b/Build/source/texk/web2c/xetexdir/XeTeXOTMath.h
index 8d094a82cd1..7e2fe3f552a 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeXOTMath.h
+++ b/Build/source/texk/web2c/xetexdir/XeTeXOTMath.h
@@ -34,32 +34,26 @@ authorization from the copyright holders.
#define __XETEX_OT_MATH__
#include "XeTeX_ext.h"
-
-#ifdef XETEX_OT_MATH_IMPLEMENTATION
#include "MathTable.h"
-#include "layout/LEFontInstance.h"
-#else
-#define GlyphAssembly void /* used when we're just declaring the functions for xetex.ch */
-#endif
/* public "C" APIs for calling from Web(-to-C) code */
#ifdef __cplusplus
extern "C" {
#endif
- int getnativemathsyparam(int f, int n);
- int getnativemathexparam(int f, int n);
- int getotmathconstant(int f, int n);
- int getotmathvariant(int f, int g, int v, integer* adv, int horiz);
- void* getotassemblyptr(int f, int g, int horiz);
- int getotmathitalcorr(int f, int g);
- int getotmathaccentpos(int f, int g);
- int otpartcount(const GlyphAssembly* a);
- int otpartglyph(const GlyphAssembly* a, int i);
- int otpartisextender(const GlyphAssembly* a, int i);
- int otpartstartconnector(int f, const GlyphAssembly* a, int i);
- int otpartendconnector(int f, const GlyphAssembly* a, int i);
- int otpartfulladvance(int f, const GlyphAssembly* a, int i);
- int otminconnectoroverlap(int f);
+ int get_native_mathsy_param(int f, int n);
+ int get_native_mathex_param(int f, int n);
+ int get_ot_math_constant(int f, int n);
+ int get_ot_math_variant(int f, int g, int v, integer* adv, int horiz);
+ void* get_ot_assembly_ptr(int f, int g, int horiz);
+ int get_ot_math_ital_corr(int f, int g);
+ int get_ot_math_accent_pos(int f, int g);
+ int ot_part_count(const GlyphAssembly* a);
+ int ot_part_glyph(const GlyphAssembly* a, int i);
+ int ot_part_is_extender(const GlyphAssembly* a, int i);
+ int ot_part_start_connector(int f, const GlyphAssembly* a, int i);
+ int ot_part_end_connector(int f, const GlyphAssembly* a, int i);
+ int ot_part_full_advance(int f, const GlyphAssembly* a, int i);
+ int ot_min_connector_overlap(int f);
#ifdef __cplusplus
};
#endif
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
index 34ee436f827..c23f9e16bcc 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
+++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
@@ -128,11 +128,6 @@ typedef struct
UInt32 maxMemType1;
} POSTTable;
-enum {
- LE_MAXP_TABLE_TAG = 0x6D617870UL, /**< 'maxp' */
- LE_POST_TABLE_TAG = 0x706F7374UL, /**< 'post' */
-};
-
/* tables/values used in UTF-8 interpretation -
code is based on ConvertUTF.[ch] sample code
published by the Unicode consortium */
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.h b/Build/source/texk/web2c/xetexdir/XeTeX_ext.h
index 630a3f63711..49eeeb5ec04 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.h
+++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.h
@@ -237,7 +237,6 @@ extern "C" {
void setinputfileencoding(unicodefile f, integer mode, integer encodingData);
void uclose(unicodefile f);
- int input_line_icu(unicodefile f);
void linebreakstart(integer localeStrNum, const UniChar* text, integer textLength);
int linebreaknext();
int getencodingmodeandinfo(integer* info);
diff --git a/Build/source/texk/web2c/xetexdir/xetex.ch b/Build/source/texk/web2c/xetexdir/xetex.ch
index 45331796f2d..16cc05c8650 100644
--- a/Build/source/texk/web2c/xetexdir/xetex.ch
+++ b/Build/source/texk/web2c/xetexdir/xetex.ch
@@ -67,8 +67,8 @@ authorization from the copyright holders.
@d TeX_banner=='This is TeX, Version 3.1415926' {printed when \TeX\ starts}
@#
@d XeTeX_version=0
-@d XeTeX_revision==".9998"
-@d XeTeX_version_string=='-0.9998' {current \XeTeX\ version}
+@d XeTeX_revision==".9999"
+@d XeTeX_version_string=='-0.9999' {current \XeTeX\ version}
@#
@d XeTeX_banner=='This is XeTeX, Version 3.1415926',eTeX_version_string,XeTeX_version_string
{printed when \XeTeX\ starts}
@@ -1685,6 +1685,17 @@ match: begin match_chr:=c; print_char(c); incr(n); print_char(n);
@z
@x
+@d chr_cmd(#)==begin print(#); print_ASCII(chr_code);
+ end
+@y
+@d chr_cmd(#)==begin print(#);
+ if chr_code < @"10000 then print_ASCII(chr_code)
+ {non-Plane 0 Unicodes can't be sent through |print_ASCII|}
+ else begin print("number "); print_hex(chr_code) end;
+ end
+@z
+
+@x
procedure print_cmd_chr(@!cmd:quarterword;@!chr_code:halfword);
var n:integer; {temp variable}
@y
@@ -4628,7 +4639,7 @@ if is_native_font(cur_f) then begin
set_native_glyph_metrics(p, 1);
free_node(z, native_size(z));
delta:=get_ot_math_ital_corr(cur_f, native_glyph(p));
- if (math_type(nucleus(q))=math_text_char)and(space(cur_f)<>0) then
+ if (math_type(nucleus(q))=math_text_char)and(not is_new_mathfont(cur_f)<>0) then
delta:=0; {no italic correction in mid-word of text font}
if (math_type(subscr(q))=empty)and(delta<>0) then
begin link(p):=new_kern(delta); delta:=0;
diff --git a/Build/source/texk/web2c/xetexdir/xetex.h b/Build/source/texk/web2c/xetexdir/xetex.h
index 4e31510a629..5b492bbcf38 100644
--- a/Build/source/texk/web2c/xetexdir/xetex.h
+++ b/Build/source/texk/web2c/xetexdir/xetex.h
@@ -32,11 +32,11 @@ authorization from the copyright holders.
/* additional declarations we want to slip in for xetex */
-#define native_node_size 6
-#define native_node_text(p) ((unsigned short*)(&(mem[(p) + native_node_size])))
+#define native_node_size 6
+#define native_node_text(p) ((unsigned short*)(&(mem[(p) + native_node_size])))
-#define getnativechar(p,i) native_node_text(p)[i]
-#define setnativechar(p,i,v) native_node_text(p)[i] = v
+#define getnativechar(p,i) native_node_text(p)[i]
+#define setnativechar(p,i,v) native_node_text(p)[i] = v
#define getnativeusv(p,i) \
((native_node_text(p)[i] >= 0xd800 && native_node_text(p)[i] < 0xdc00) ? \
@@ -44,66 +44,82 @@ authorization from the copyright holders.
native_node_text(p)[i])
/* p is native_word node; g is XeTeX_use_glyph_metrics flag */
-#define setnativemetrics(p,g) measure_native_node(&(mem[p]), g)
+#define setnativemetrics(p,g) measure_native_node(&(mem[p]), g)
-#define setnativeglyphmetrics(p,g) measure_native_glyph(&(mem[p]), g)
+#define setnativeglyphmetrics(p,g) measure_native_glyph(&(mem[p]), g)
-#define setjustifiednativeglyphs(p) store_justified_native_glyphs(&(mem[p]))
+#define setjustifiednativeglyphs(p) store_justified_native_glyphs(&(mem[p]))
-#define getnativeitaliccorrection(p) get_native_ital_corr(&(mem[p]))
-#define getnativeglyphitaliccorrection(p) get_native_glyph_ital_corr(&(mem[p]))
+#define getnativeitaliccorrection(p) get_native_ital_corr(&(mem[p]))
+#define getnativeglyphitaliccorrection(p) get_native_glyph_ital_corr(&(mem[p]))
-#define getnativeglyph(p,i) get_native_glyph_id(&(mem[p]), i)
+#define getnativeglyph(p,i) get_native_glyph_id(&(mem[p]), i)
-#define makexdvglypharraydata(p) makeXDVGlyphArrayData(&(mem[p]))
-#define xdvbufferbyte(i) xdvbuffer[i]
+#define makexdvglypharraydata(p) makeXDVGlyphArrayData(&(mem[p]))
+#define xdvbufferbyte(i) xdvbuffer[i]
-#define getnativewordcp(p,s) get_native_word_cp(&(mem[p]), s)
+#define getnativewordcp(p,s) get_native_word_cp(&(mem[p]), s)
-void* getotassemblyptr(int f, int g, int horiz); /* function in XeTeXOTMath.cpp */
+void* get_ot_assembly_ptr(int f, int g, int horiz); /* function in XeTeXOTMath.cpp */
-#define pic_node_size 8
+#define pic_node_size 8
#define deref(p) (*(p))
-#define findpicfile(a,b,c,d) find_pic_file(a, b, c, d)
+#define findpicfile(a,b,c,d) find_pic_file(a, b, c, d)
-#define picpathbyte(p,i) ((unsigned char*)&(mem[p+pic_node_size]))[i]
+#define picpathbyte(p,i) ((unsigned char*)&(mem[p+pic_node_size]))[i]
-#define dviopenout(f) open_dvi_output(&(f))
+#define dviopenout(f) open_dvi_output(&(f))
-#define nullptr (NULL)
-#define glyphinfobyte(p,k) ((unsigned char*)p)[k]
-#define casttoushort(x) (unsigned short)(x)
+#define nullptr (NULL)
+#define glyphinfobyte(p,k) ((unsigned char*)p)[k]
+#define casttoushort(x) (unsigned short)(x)
/* easier to do the bit-twiddling here than in Pascal */
/* read fields from a 32-bit math code */
-#define mathfamfield(x) (((unsigned)(x) >> 24) & 0xFF)
-#define mathclassfield(x) (((unsigned)(x) >> 21) & 0x07)
-#define mathcharfield(x) ((unsigned)(x) & 0x1FFFFF)
+#define mathfamfield(x) (((unsigned)(x) >> 24) & 0xFF)
+#define mathclassfield(x) (((unsigned)(x) >> 21) & 0x07)
+#define mathcharfield(x) ((unsigned)(x) & 0x1FFFFF)
/* calculate pieces to assign to a math code */
-#define setfamilyfield(x) (((unsigned)(x) & 0xFF) << 24)
-#define setclassfield(x) (((unsigned)(x) & 0x07) << 21)
+#define setfamilyfield(x) (((unsigned)(x) & 0xFF) << 24)
+#define setclassfield(x) (((unsigned)(x) & 0x07) << 21)
+
+/* aliases */
+#define getnativemathsyparam get_native_mathsy_param
+#define getnativemathexparam get_native_mathex_param
+#define getotmathconstant get_ot_math_constant
+#define getotmathvariant get_ot_math_variant
+#define getotassemblyptr get_ot_assembly_ptr
+#define getotmathitalcorr get_ot_math_ital_corr
+#define getotmathaccentpos get_ot_math_accent_pos
+#define otpartcount ot_part_count
+#define otpartglyph ot_part_glyph
+#define otpartisextender ot_part_is_extender
+#define otpartstartconnector ot_part_start_connector
+#define otpartendconnector ot_part_end_connector
+#define otpartfulladvance ot_part_full_advance
+#define otminconnectoroverlap ot_min_connector_overlap
/* Unicode file reading modes */
-#define AUTO 0 /* default: will become one of 1..3 at file open time, after sniffing */
-#define UTF8 1
-#define UTF16BE 2
-#define UTF16LE 3
-#define RAW 4
-#define ICUMAPPING 5
+#define AUTO 0 /* default: will become one of 1..3 at file open time, after sniffing */
+#define UTF8 1
+#define UTF16BE 2
+#define UTF16LE 3
+#define RAW 4
+#define ICUMAPPING 5
/* we don't use xchr, so change the cpascal.h definition of this... */
#undef Xchr
-#define Xchr(x) (x)
+#define Xchr(x) (x)
#ifdef XETEX_MAC
-#undef input /* this is defined in texmfmp.h, but we don't need it and it confuses the carbon headers */
+#undef input /* this is defined in texmfmp.h, but we don't need it and it confuses the carbon headers */
#undef output
-#include <Carbon/Carbon.h> /* for Mac OS X, it's handy to have the Carbon APIs available */
+#include <Carbon/Carbon.h> /* for Mac OS X, it's handy to have the Carbon APIs available */
#endif
-#include "trans.h" /* functions for affine transform operations */
-#include <teckit/TECkit_Common.h> /* include this before XeTeX_ext.h */
-#include "XeTeX_ext.h" /* other extension functions */
+#include "trans.h" /* functions for affine transform operations */
+#include <teckit/TECkit_Common.h> /* include this before XeTeX_ext.h */
+#include "XeTeX_ext.h" /* other extension functions */