summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-03-14 14:12:16 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2013-03-14 14:12:16 +0000
commitc225f08e1b353c843a147c6ce2a9689244f3a20c (patch)
tree0d606602e35a9dc74a51868dcaf144e805af8906 /Build
parentc8157f242392ce9ae8d294c509e0c5431004189a (diff)
Ignore native font family and style names
git-svn-id: svn://tug.org/texlive/trunk@29383 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/xdvipdfmx/ChangeLog2
-rw-r--r--Build/source/texk/xdvipdfmx/src/dvi.c50
-rw-r--r--Build/source/texk/xdvipdfmx/src/fontmap.c1
-rw-r--r--Build/source/texk/xdvipdfmx/src/fontmap.h1
4 files changed, 18 insertions, 36 deletions
diff --git a/Build/source/texk/xdvipdfmx/ChangeLog b/Build/source/texk/xdvipdfmx/ChangeLog
index 68557375769..c9033b9d2c9 100644
--- a/Build/source/texk/xdvipdfmx/ChangeLog
+++ b/Build/source/texk/xdvipdfmx/ChangeLog
@@ -5,6 +5,8 @@
* src/fontmap.c: Remove commented out old Mac code.
* src/fontmap.c (pdf_load_native_font_from_path, pdf_load_native_font):
Merge.
+ * src/dvi.c, src/fontmap.c, src/fontmap.h: Ignore native font family and
+ style names that we no longer use.
2013-02-25 Peter Breitenlohner <peb@mppmu.mpg.de>
diff --git a/Build/source/texk/xdvipdfmx/src/dvi.c b/Build/source/texk/xdvipdfmx/src/dvi.c
index a1c7f0d7106..02ceb3ff751 100644
--- a/Build/source/texk/xdvipdfmx/src/dvi.c
+++ b/Build/source/texk/xdvipdfmx/src/dvi.c
@@ -154,7 +154,7 @@ static struct font_def
int font_id; /* index of _loaded_ font in loaded_fonts array */
int used;
#ifdef XETEX
- char *fam_name, *sty_name; /* only used for native fonts in XeTeX */
+ int native; /* boolean */
unsigned long rgba_color; /* only used for native fonts in XeTeX */
int layout_dir; /* 1 = vertical, 0 = horizontal */
int extend;
@@ -615,8 +615,7 @@ read_font_record (SIGNED_QUAD tex_id)
def_fonts[num_def_fonts].design_size = design_size;
def_fonts[num_def_fonts].used = 0;
#ifdef XETEX
- def_fonts[num_def_fonts].fam_name = NULL;
- def_fonts[num_def_fonts].sty_name = NULL;
+ def_fonts[num_def_fonts].native = 0;
def_fonts[num_def_fonts].rgba_color = 0xffffffff;
def_fonts[num_def_fonts].layout_dir = 0;
def_fonts[num_def_fonts].extend = 0x00010000; /* 1.0 */
@@ -634,8 +633,8 @@ read_native_font_record (SIGNED_QUAD tex_id)
{
UNSIGNED_PAIR flags;
UNSIGNED_QUAD point_size;
- char *font_name, *fam_name, *sty_name;
- int plen, flen, slen;
+ char *font_name;
+ int plen, flen, slen, i;
if (num_def_fonts >= max_def_fonts) {
max_def_fonts += TEX_FONTS_ALLOC_SIZE;
@@ -653,23 +652,17 @@ read_native_font_record (SIGNED_QUAD tex_id)
ERROR(invalid_signature);
}
font_name[plen] = '\0';
- fam_name = NEW(flen + 1, char);
- if (fread(fam_name, 1, flen, dvi_file) != flen) {
- ERROR(invalid_signature);
- }
- fam_name[flen] = '\0';
- sty_name = NEW(slen + 1, char);
- if (fread(sty_name, 1, slen, dvi_file) != slen) {
- ERROR(invalid_signature);
- }
- sty_name[slen] = '\0';
+
+ /* ignore family and style names */
+ for (i = 0; i < flen + slen; ++i)
+ get_unsigned_byte(dvi_file);
+
def_fonts[num_def_fonts].tex_id = tex_id;
def_fonts[num_def_fonts].font_name = font_name;
- def_fonts[num_def_fonts].fam_name = fam_name;
- def_fonts[num_def_fonts].sty_name = sty_name;
def_fonts[num_def_fonts].point_size = point_size;
def_fonts[num_def_fonts].design_size = 655360; /* hard-code as 10pt for now, not used anyway */
def_fonts[num_def_fonts].used = 0;
+ def_fonts[num_def_fonts].native = 1;
if (flags & XDV_FLAG_VERTICAL)
def_fonts[num_def_fonts].layout_dir = 1;
else
@@ -1042,8 +1035,8 @@ dvi_locate_font (const char *tfm_name, spt_t ptsize)
#ifdef XETEX
static int
-dvi_locate_native_font (const char *ps_name, const char *fam_name,
- const char *sty_name, spt_t ptsize, int layout_dir, int extend, int slant, int embolden)
+dvi_locate_native_font (const char *ps_name,
+ spt_t ptsize, int layout_dir, int extend, int slant, int embolden)
{
int cur_id = -1;
fontmap_rec *mrec;
@@ -1051,7 +1044,7 @@ dvi_locate_native_font (const char *ps_name, const char *fam_name,
char *fontmap_key = malloc(strlen(ps_name) + 40); // CHECK this is enough
if (verbose)
- MESG("<%s(%s:%s)@%.2fpt", ps_name, fam_name, sty_name, ptsize * dvi2pts);
+ MESG("<%s@%.2fpt", ps_name, ptsize * dvi2pts);
need_more_fonts(1);
@@ -1060,9 +1053,8 @@ dvi_locate_native_font (const char *ps_name, const char *fam_name,
sprintf(fontmap_key, "%s/%c/%d/%d/%d", ps_name, layout_dir == 0 ? 'H' : 'V', extend, slant, embolden);
mrec = pdf_lookup_fontmap_record(fontmap_key);
if (mrec == NULL) {
- if (pdf_load_native_font(ps_name, fam_name, sty_name, layout_dir, extend, slant, embolden) == -1) {
- ERROR("Cannot proceed without the \"native\" font: %s (%s %s)...",
- ps_name, fam_name, sty_name);
+ if (pdf_load_native_font(ps_name, layout_dir, extend, slant, embolden) == -1) {
+ ERROR("Cannot proceed without the \"native\" font: %s", ps_name);
}
mrec = pdf_lookup_fontmap_record(fontmap_key);
/* FIXME: would be more efficient if pdf_load_native_font returned the mrec ptr (or NULL for error)
@@ -1716,10 +1708,8 @@ do_fnt (SIGNED_QUAD tex_id)
int font_id;
#ifdef XETEX
- if (def_fonts[i].fam_name) {
+ if (def_fonts[i].native) {
font_id = dvi_locate_native_font(def_fonts[i].font_name,
- def_fonts[i].fam_name,
- def_fonts[i].sty_name,
def_fonts[i].point_size,
def_fonts[i].layout_dir,
def_fonts[i].extend,
@@ -2328,14 +2318,6 @@ dvi_close (void)
if (def_fonts[i].font_name)
RELEASE(def_fonts[i].font_name);
def_fonts[i].font_name = NULL;
-#ifdef XETEX
- if (def_fonts[i].fam_name)
- RELEASE(def_fonts[i].fam_name);
- def_fonts[i].fam_name = NULL;
- if (def_fonts[i].sty_name)
- RELEASE(def_fonts[i].sty_name);
- def_fonts[i].sty_name = NULL;
-#endif
}
RELEASE(def_fonts);
}
diff --git a/Build/source/texk/xdvipdfmx/src/fontmap.c b/Build/source/texk/xdvipdfmx/src/fontmap.c
index 13c232e3edb..12957ddda30 100644
--- a/Build/source/texk/xdvipdfmx/src/fontmap.c
+++ b/Build/source/texk/xdvipdfmx/src/fontmap.c
@@ -1101,7 +1101,6 @@ static FT_Library ftLib;
int
pdf_load_native_font (const char *ps_name,
- const char *fam_name, const char *sty_name,
int layout_dir, int extend, int slant, int embolden)
{
const char *p;
diff --git a/Build/source/texk/xdvipdfmx/src/fontmap.h b/Build/source/texk/xdvipdfmx/src/fontmap.h
index 2624e856c5d..c257e692c78 100644
--- a/Build/source/texk/xdvipdfmx/src/fontmap.h
+++ b/Build/source/texk/xdvipdfmx/src/fontmap.h
@@ -104,7 +104,6 @@ extern int is_pdfm_mapline (const char *mline);
#ifdef XETEX
extern int pdf_load_native_font (const char *ps_name,
- const char *fam_name, const char *sty_name,
int layout_dir, int extend, int slant, int embolden);
#endif