diff options
author | Jonathan Kew <jfkthame@googlemail.com> | 2006-12-14 16:15:20 +0000 |
---|---|---|
committer | Jonathan Kew <jfkthame@googlemail.com> | 2006-12-14 16:15:20 +0000 |
commit | 7e95a2ea070baf92d1c8c7d50b4b1fb62aceb574 (patch) | |
tree | b6b1ea378a47a16fdef0ec5f63ea45656d99b8c3 /Build | |
parent | 108bac77f365b124be50b10dca56ed9fa4c29ed5 (diff) |
merge dvipdfmx updates into xdvipdfmx
git-svn-id: svn://tug.org/texlive/trunk@2740 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/xdvipdfmx/ChangeLog | 33 | ||||
-rwxr-xr-x | Build/source/texk/xdvipdfmx/configure | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/configure.in | 2 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/dvi.c | 17 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/dvi.h | 3 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/dvipdfmx.c | 13 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/mpost.c | 30 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/pdfcolor.c | 22 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/pdfcolor.h | 3 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/pdfdev.c | 22 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/pdfdev.h | 5 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/pdfdoc.c | 1 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/pdfdraw.c | 68 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/pdfdraw.h | 3 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/pdfobj.c | 3 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/spc_pdfm.c | 5 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/spc_xtx.c | 3 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/t1_load.c | 48 | ||||
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/truetype.c | 2 |
19 files changed, 157 insertions, 128 deletions
diff --git a/Build/source/texk/xdvipdfmx/ChangeLog b/Build/source/texk/xdvipdfmx/ChangeLog index 407eeccab5f..7bdaaaad65e 100644 --- a/Build/source/texk/xdvipdfmx/ChangeLog +++ b/Build/source/texk/xdvipdfmx/ChangeLog @@ -1,8 +1,39 @@ -$Header: /home/cvsroot/dvipdfmx/ChangeLog,v 1.140 2005/10/14 04:57:33 chofchof Exp $ +$Header: /home/cvsroot/dvipdfmx/ChangeLog,v 1.141 2006/12/11 13:01:38 chofchof Exp $ ChangeLog: Changes for dvipdfmx =============================== +2006-12-11 Jin-Hwan Cho <chofchof@ktug.or.kr> + + * mpost.c, pdfdev.c, pdfdev.h, spc_pdfm.c, pdfcolor.c, pdfcolor.h, + pdfdraw.c, pdfdraw.h: + Temporary implementation for mps files generated by mptopdf. + +2006-12-11 Jin-Hwan Cho <chofchof@ktug.or.kr> + + * pdfcolor.c: + Fixed the color bug reported by H. J. Lee and Pablo Rodriguez. + +2006-12-07 Jin-Hwan Cho <chofchof@ktug.or.kr> + + * pdfobj.c: + Fixed a bug with xref, reported by Paul Guyot. + +2006-12-06 Jin-Hwan Cho <chofchof@ktug.or.kr> + + * t1_load.c: + Modified to work with broken fonts, e.g. belleek/blsy.pfb. + +2006-12-06 Jin-Hwan Cho <chofchof@ktug.or.kr> + + * dvipdfmx.c, dvi.c, dvi.h: + Add xoffset and yoffset specials. + +2005-12-18 Jin-Hwan Cho <chofchof@ktug.or.kr> + + * dpxfile.c: + Fixed a bug found by Karnes Kim. + 2005-10-14 Jin-Hwan Cho <chofchof@ktug.or.kr> * spc_tpic.c: diff --git a/Build/source/texk/xdvipdfmx/configure b/Build/source/texk/xdvipdfmx/configure index 87dcde69b24..62bfe915bd3 100755 --- a/Build/source/texk/xdvipdfmx/configure +++ b/Build/source/texk/xdvipdfmx/configure @@ -1632,7 +1632,7 @@ fi # Define the identity of the package. PACKAGE=xdvipdfmx - VERSION=0.3 + VERSION=0.4 cat >>confdefs.h <<_ACEOF diff --git a/Build/source/texk/xdvipdfmx/configure.in b/Build/source/texk/xdvipdfmx/configure.in index fa9fca8ff99..1ea0b805573 100644 --- a/Build/source/texk/xdvipdfmx/configure.in +++ b/Build/source/texk/xdvipdfmx/configure.in @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(src/dvipdfmx.c) -AM_INIT_AUTOMAKE(xdvipdfmx, 0.3) +AM_INIT_AUTOMAKE(xdvipdfmx, 0.4) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE diff --git a/Build/source/texk/xdvipdfmx/src/dvi.c b/Build/source/texk/xdvipdfmx/src/dvi.c index 515f940a4ba..cda84f8cda3 100644 --- a/Build/source/texk/xdvipdfmx/src/dvi.c +++ b/Build/source/texk/xdvipdfmx/src/dvi.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/dvi.c,v 1.37 2005/08/18 08:46:21 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/dvi.c,v 1.38 2006/12/06 12:50:40 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -2421,7 +2421,7 @@ read_length (double *vp, double mag, char **pp, char *endptr) static int -scan_special (double *wd, double *ht, char *lm, const char *buf, UNSIGNED_QUAD size) +scan_special (double *wd, double *ht, double *xo, double *yo, char *lm, const char *buf, UNSIGNED_QUAD size) { char *q, *p = (char *) buf; char *endptr; @@ -2461,6 +2461,14 @@ scan_special (double *wd, double *ht, char *lm, const char *buf, UNSIGNED_QUAD s error = read_length(ht, dvi_tell_mag(), &p, endptr); if (!error) *ht *= dvi_tell_mag(); + } else if (!strcmp(kp, "xoffset")) { + error = read_length(xo, dvi_tell_mag(), &p, endptr); + if (!error) + *xo *= dvi_tell_mag(); + } else if (!strcmp(kp, "yoffset")) { + error = read_length(yo, dvi_tell_mag(), &p, endptr); + if (!error) + *yo *= dvi_tell_mag(); } RELEASE(kp); } @@ -2497,7 +2505,8 @@ scan_special (double *wd, double *ht, char *lm, const char *buf, UNSIGNED_QUAD s void dvi_scan_paper_size (long page_no, - double *page_width, double *page_height, char *landscape) + double *page_width, double *page_height, + double *x_offset, double *y_offset, char *landscape) { FILE *fp = dvi_file; long offset; @@ -2537,7 +2546,7 @@ dvi_scan_paper_size (long page_no, } if (fread(dvi_page_buffer + dvi_page_buf_index, sizeof(char), size, fp) != size) ERROR("Reading DVI file failed!"); - scan_special(page_width, page_height, landscape, + scan_special(page_width, page_height, x_offset, y_offset, landscape, (char*)dvi_page_buffer + dvi_page_buf_index, size); dvi_page_buf_index += size; continue; diff --git a/Build/source/texk/xdvipdfmx/src/dvi.h b/Build/source/texk/xdvipdfmx/src/dvi.h index e47aebc130e..b25661eaf37 100644 --- a/Build/source/texk/xdvipdfmx/src/dvi.h +++ b/Build/source/texk/xdvipdfmx/src/dvi.h @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/dvi.h,v 1.12 2004/09/02 12:23:06 hirata Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/dvi.h,v 1.13 2006/12/06 12:50:40 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -70,6 +70,7 @@ extern void dvi_do_page (long page_no, double x_offset, double y_offset); extern void dvi_scan_paper_size (long page_no, double *width, double *height, + double *x_offset, double *y_offset, char *landscape); extern int dvi_locate_font (const char *name, spt_t ptsize); diff --git a/Build/source/texk/xdvipdfmx/src/dvipdfmx.c b/Build/source/texk/xdvipdfmx/src/dvipdfmx.c index 8339a315c06..30e5a07d144 100644 --- a/Build/source/texk/xdvipdfmx/src/dvipdfmx.c +++ b/Build/source/texk/xdvipdfmx/src/dvipdfmx.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/dvipdfmx.c,v 1.45 2005/07/30 11:44:18 hirata Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/dvipdfmx.c,v 1.47 2006/12/11 13:23:26 chofchof Exp $ This is xdvipdfmx, an extended version of... @@ -675,12 +675,13 @@ do_dvi_pages (void) page_no = page_ranges[i].first; while (dvi_npages() > 0) { if (page_no < dvi_npages()) { - double w, h; + double w, h, xo, yo; char lm; /* Users want to change page size even after page is started! */ w = page_width; h = page_height; lm = landscape_mode; - dvi_scan_paper_size(page_no, &w, &h, &lm); + xo = x_offset; yo = y_offset; + dvi_scan_paper_size(page_no, &w, &h, &xo, &yo, &lm); if (lm != landscape_mode) { SWAP(w, h); landscape_mode = lm; @@ -689,6 +690,10 @@ do_dvi_pages (void) page_width = w; page_height = h; } + if (x_offset != xo || y_offset != yo) { + x_offset = xo; + y_offset = yo; + } if (page_width != paper_width || page_height != paper_height) { mediabox.llx = 0.0; @@ -843,7 +848,7 @@ main (int argc, char *argv[]) if (dvi2pts == 0.0) ERROR("dvi_init() failed!"); - dvi_scan_paper_size(0, &paper_width, &paper_height, &landscape_mode); + dvi_scan_paper_size(0, &paper_width, &paper_height, &x_offset, &y_offset, &landscape_mode); if (landscape_mode) { SWAP(paper_width, paper_height); } diff --git a/Build/source/texk/xdvipdfmx/src/mpost.c b/Build/source/texk/xdvipdfmx/src/mpost.c index 16a60a54b50..6875d5d573e 100644 --- a/Build/source/texk/xdvipdfmx/src/mpost.c +++ b/Build/source/texk/xdvipdfmx/src/mpost.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/mpost.c,v 1.35 2005/08/30 07:56:08 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/mpost.c,v 1.36 2006/12/11 12:46:03 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -342,6 +342,8 @@ skip_prolog (char **start, char *end) #define STRINGWIDTH 210 +#define DEF 999 + #define FSHOW 1001 #define STEXFIG 1002 #define ETEXFIG 1003 @@ -408,7 +410,9 @@ static struct operators {"setfont", SETFONT}, {"currentfont", CURRENTFONT}, - {"stringwidth", STRINGWIDTH} + {"stringwidth", STRINGWIDTH}, + + {"def", DEF} /* not implemented yet; just work with mptopdf */ }; static struct operators mps_operators[] = { @@ -1334,6 +1338,12 @@ do_operator (const char *token, double x_user, double y_user) error = do_texfig_operator(opcode, x_user, y_user); break; + case DEF: + tmp = POP_STACK(); + tmp = POP_STACK(); + /* do nothing; not implemented yet */ + break; + default: if (is_fontname(token)) { PUSH(pdf_new_name(token)); @@ -1392,7 +1402,21 @@ mp_parse_body (char **start, char *end, double x_user, double y_user) PUSH(obj); } else if (**start == '/' && (obj = parse_pdf_name(start, end))) { - PUSH(obj); + /* Temporary implementation for mps files generated by mptopdf: + * Just ignore the following command: + * /fshow {exch findfont exch scalefont setfont show} bind def + */ + if (strcmp(pdf_name_value(obj), "fshow") == 0) { + while (*start < end - 3) { + if (**start == 'd' && *(*start+1) == 'e' && *(*start+2) == 'f') { + *start += 3; + break; + } + (*start)++; + } + } else { + PUSH(obj); + } } else { token = parse_ident(start, end); if (!token) diff --git a/Build/source/texk/xdvipdfmx/src/pdfcolor.c b/Build/source/texk/xdvipdfmx/src/pdfcolor.c index 0e0162f04ce..8d9341302c1 100644 --- a/Build/source/texk/xdvipdfmx/src/pdfcolor.c +++ b/Build/source/texk/xdvipdfmx/src/pdfcolor.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/pdfcolor.c,v 1.11 2005/08/18 04:36:20 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/pdfcolor.c,v 1.13 2006/12/11 12:46:03 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -350,6 +350,20 @@ static struct { 0, }; +/* BUG (20060330): color change does not effect on the next page. + * The problem is due to the part of grestore because it restores + * the color values in the state of gsave which are not correct + * if the color values are changed inside of a page. + */ +void +pdf_dev_preserve_color (void) +{ + if (color_stack.next > 0) { + current_stroke = color_stack.stroke[color_stack.next]; + current_fill = color_stack.fill[color_stack.next]; + } +} + void pdf_dev_reset_color (void) { @@ -369,10 +383,6 @@ pdf_dev_reset_color (void) strokecolor = default_color; fillcolor = default_color; } -#if 0 - pdf_color_graycolor(¤t_stroke, 0.0); - pdf_color_graycolor(¤t_fill, 0.0); -#endif pdf_dev_setcolor(&strokecolor, 0); pdf_dev_setcolor(&fillcolor, 1); @@ -403,7 +413,7 @@ pdf_color_push (void) memcpy(&color_stack.fill[current], ¤t_fill , sizeof(pdf_color)); - color_stack.next += 1; + color_stack.next++; return; } diff --git a/Build/source/texk/xdvipdfmx/src/pdfcolor.h b/Build/source/texk/xdvipdfmx/src/pdfcolor.h index 00c421f9349..48e930be1a3 100644 --- a/Build/source/texk/xdvipdfmx/src/pdfcolor.h +++ b/Build/source/texk/xdvipdfmx/src/pdfcolor.h @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/pdfcolor.h,v 1.6 2005/07/30 11:44:18 hirata Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/pdfcolor.h,v 1.7 2006/12/11 12:46:03 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -93,6 +93,7 @@ extern void pdf_color_pop (void); extern void pdf_color_clear (void); /* Reinstall color */ +extern void pdf_dev_preserve_color(void); extern void pdf_dev_reset_color (void); #endif /* _PDF_COLOR_H_ */ diff --git a/Build/source/texk/xdvipdfmx/src/pdfdev.c b/Build/source/texk/xdvipdfmx/src/pdfdev.c index 18e0080794c..e960965d4c4 100644 --- a/Build/source/texk/xdvipdfmx/src/pdfdev.c +++ b/Build/source/texk/xdvipdfmx/src/pdfdev.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/pdfdev.c,v 1.60 2005/08/12 18:22:24 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/pdfdev.c,v 1.61 2006/12/11 12:46:03 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -1227,22 +1227,6 @@ pdf_close_device (void) * BOP and EOP manipulate some of the same data structures * as the font stuff. */ - - -/* - * The following routine is here for forms. Since a form is - * self-contained, it will need its own Tf command at the - * beginningg even if it is continuing to set type in the - * current font. This routine simply forces reinstantiation - * of the current font. - */ -void -pdf_dev_reset (void) -{ - pdf_dev_reset_fonts(); - pdf_dev_reset_color(); -} - void pdf_dev_reset_fonts (void) { @@ -1291,7 +1275,9 @@ pdf_dev_bop (const pdf_tmatrix *M) pdf_dev_gsave(); pdf_dev_concat(M); - pdf_dev_reset(); + pdf_dev_reset_fonts(); + pdf_dev_preserve_color(); /* preserve the last color in the previous page */ + pdf_dev_reset_color(); if (have_saved_color) { pdf_dev_setcolor(&saved_sc, 0); diff --git a/Build/source/texk/xdvipdfmx/src/pdfdev.h b/Build/source/texk/xdvipdfmx/src/pdfdev.h index dbc28cf36fb..f29481266b5 100644 --- a/Build/source/texk/xdvipdfmx/src/pdfdev.h +++ b/Build/source/texk/xdvipdfmx/src/pdfdev.h @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/pdfdev.h,v 1.18 2005/08/12 18:22:24 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/pdfdev.h,v 1.19 2006/12/11 12:46:03 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -202,8 +202,7 @@ extern void pdf_dev_set_param (int param_type, int value); * XFrom (content grabbing) and Metapost support want them. */ extern void pdf_dev_reset_fonts (void); -extern void pdf_dev_reset_color (void); -extern void pdf_dev_reset (void); /* Does both font and color */ +extern void pdf_dev_reset_color (void); /* defined in pdfcolor.c */ /* Initialization of transformation matrix with M and others. * They are called within pdf_doc_begin_page() and pdf_doc_end_page(). diff --git a/Build/source/texk/xdvipdfmx/src/pdfdoc.c b/Build/source/texk/xdvipdfmx/src/pdfdoc.c index a15c4773ba5..c6d0d386ae8 100644 --- a/Build/source/texk/xdvipdfmx/src/pdfdoc.c +++ b/Build/source/texk/xdvipdfmx/src/pdfdoc.c @@ -500,6 +500,7 @@ asn_date (char *date_string) bd_time->tm_year + 1900, bd_time->tm_mon + 1, bd_time->tm_mday, bd_time->tm_hour, bd_time->tm_min, bd_time->tm_sec, -(bd_time->tm_gmtoff / 3600), (bd_time->tm_gmtoff % 3600) / 60); + return strlen(date_string); #else /* simplified version that should work everywhere */ time_t current_time; diff --git a/Build/source/texk/xdvipdfmx/src/pdfdraw.c b/Build/source/texk/xdvipdfmx/src/pdfdraw.c index ec4f8b1981d..444d177d9b0 100644 --- a/Build/source/texk/xdvipdfmx/src/pdfdraw.c +++ b/Build/source/texk/xdvipdfmx/src/pdfdraw.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/pdfdraw.c,v 1.12 2005/08/31 08:22:42 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/pdfdraw.c,v 1.13 2006/12/11 12:46:03 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -1274,11 +1274,8 @@ pdf_dev_grestore_to (int depth) pdf_dev__clean_gstate(gs); RELEASE(gs); } -#if 0 pdf_dev_reset_fonts(); -#else - pdf_dev_reset(); -#endif + pdf_dev_reset_color(); return; } @@ -1305,11 +1302,8 @@ pdf_dev_grestore (void) pdf_doc_add_page_content(" Q", 2); -#if 0 pdf_dev_reset_fonts(); -#else - pdf_dev_reset(); -#endif + pdf_dev_reset_color(); pdf_dev_setcolor(&sc, 0); pdf_dev_setcolor(&fc, 1); @@ -1317,62 +1311,6 @@ pdf_dev_grestore (void) return 0; } -#if 0 -void -pdf_dev_reset_color (void) -{ - m_stack *gss = &_gsstck; - pdf_gstate *gs = m_stack_top(gss); - pdf_color fill, stroke; - - pdf_color_copycolor(&fill, &gs->fillcolor); - pdf_color_copycolor(&stroke, &gs->strokecolor); - - /* Clear current color: */ - pdf_color_graycolor(&gs->fillcolor, 0.0); - pdf_color_graycolor(&gs->strokecolor, 0.0); - - pdf_dev_setcolor(&stroke, 0); - pdf_dev_setcolor(&fill, 1); - - return; -} - -int -pdf_dev_setcolor (const pdf_color *color, int is_fill) -{ - m_stack *gss = &_gsstck; - pdf_gstate *gs = m_stack_top(gss); - pdf_color *fcl = &gs->fillcolor; - pdf_color *scl = &gs->strokecolor; - int colormode; - pdf_color *curcol; - - if (!color) { - WARN("No color specified."); - return -1; - } - - colormode = pdf_dev_get_param(PDF_DEV_PARAM_COLORMODE); - if (!colormode) { - WARN("setcolor ignored. (Ignore color option set)"); - return 0; - } - - curcol = is_fill ? fcl : scl; - if (!pdf_color_compare_color(color, curcol)) { - return 0; - } - - graphics_mode(); - pdf_color_print_color(color, is_fill); - - pdf_color_copycolor(curcol, color); - - return 0; -} -#endif - /* * num w LW linewidth (g.t. 0) * int J LC linecap diff --git a/Build/source/texk/xdvipdfmx/src/pdfdraw.h b/Build/source/texk/xdvipdfmx/src/pdfdraw.h index 299f66b50b0..1c90851dd75 100644 --- a/Build/source/texk/xdvipdfmx/src/pdfdraw.h +++ b/Build/source/texk/xdvipdfmx/src/pdfdraw.h @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/pdfdraw.h,v 1.10 2005/08/31 08:22:42 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/pdfdraw.h,v 1.11 2006/12/11 12:46:03 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -153,7 +153,6 @@ extern int pdf_dev_current_depth (void); extern void pdf_dev_grestore_to (int depth); #define pdf_dev_grestoreall() pdf_dev_grestore_to(0); -extern void pdf_dev_reset_color (void); extern int pdf_dev_currentcolor (pdf_color *color, int is_fill); extern int pdf_dev_setcolor (const pdf_color *color, int is_fill); diff --git a/Build/source/texk/xdvipdfmx/src/pdfobj.c b/Build/source/texk/xdvipdfmx/src/pdfobj.c index 7e6930bc667..386eaaff850 100644 --- a/Build/source/texk/xdvipdfmx/src/pdfobj.c +++ b/Build/source/texk/xdvipdfmx/src/pdfobj.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/pdfobj.c,v 1.39 2005/08/30 07:53:37 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/pdfobj.c,v 1.40 2006/12/06 13:14:54 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -2203,6 +2203,7 @@ extend_xref (long new_size) xref_table[i].direct = NULL; xref_table[i].indirect = NULL; xref_table[i].used = 0; + xref_table[i].generation = 0; xref_table[i].file_position = 0L; } num_input_objects = new_size; diff --git a/Build/source/texk/xdvipdfmx/src/spc_pdfm.c b/Build/source/texk/xdvipdfmx/src/spc_pdfm.c index 755b15cbfb6..45357cccb7f 100644 --- a/Build/source/texk/xdvipdfmx/src/spc_pdfm.c +++ b/Build/source/texk/xdvipdfmx/src/spc_pdfm.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/spc_pdfm.c,v 1.23 2005/08/24 01:25:51 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/spc_pdfm.c,v 1.24 2006/12/11 12:46:03 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -851,7 +851,8 @@ spc_handler_pdfm_etrans (struct spc_env *spe, struct spc_arg *args) * we make no assumptions about what fonts. We act like we are * starting a new page. */ - pdf_dev_reset(); + pdf_dev_reset_fonts(); + pdf_dev_reset_color(); return 0; } diff --git a/Build/source/texk/xdvipdfmx/src/spc_xtx.c b/Build/source/texk/xdvipdfmx/src/spc_xtx.c index 8a7c4495d31..57b7ae72e72 100644 --- a/Build/source/texk/xdvipdfmx/src/spc_xtx.c +++ b/Build/source/texk/xdvipdfmx/src/spc_xtx.c @@ -147,7 +147,8 @@ spc_handler_xtx_grestore (struct spc_env *spe, struct spc_arg *args) * we make no assumptions about what fonts. We act like we are * starting a new page. */ - pdf_dev_reset(); + pdf_dev_reset_fonts(); + pdf_dev_reset_color(); return 0; } diff --git a/Build/source/texk/xdvipdfmx/src/t1_load.c b/Build/source/texk/xdvipdfmx/src/t1_load.c index ccb09703351..100dfd6f794 100644 --- a/Build/source/texk/xdvipdfmx/src/t1_load.c +++ b/Build/source/texk/xdvipdfmx/src/t1_load.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/t1_load.c,v 1.9 2005/07/17 09:53:38 hirata Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/t1_load.c,v 1.10 2006/12/06 12:52:43 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -645,19 +645,34 @@ parse_charstrings (cff_font *font, char *glyph_name; long len, gid, j; - glyph_name = get_next_key(start, end); - if (!glyph_name) { - return -1; - } else if (!strcmp(glyph_name, ".notdef")) { - gid = 0; - have_notdef = 1; - } else if (have_notdef) { - gid = i; - } else if (i == count - 1) { - WARN("No .notdef glyph???"); - return -1; + /* BUG-20061126 (by ChoF): + * Some fonts (e.g., belleek/blsy.pfb) does not have the correct number + * of glyphs. Modify the codes even to work with these broken fonts. + */ + tok = pst_get_token(start, end); + glyph_name = (char *)pst_getSV(tok); + + if (PST_NAMETYPE(tok)) { + RELEASE_TOK(tok); + if (!glyph_name) { + return -1; + } else if (!strcmp(glyph_name, ".notdef")) { + gid = 0; + have_notdef = 1; + } else if (have_notdef) { + gid = i; + } else if (i == count - 1) { + WARN("No .notdef glyph???"); + return -1; + } else { + gid = i+1; + } + } else if (PST_UNKNOWNTYPE(tok) && !strcmp(glyph_name, "end")) { + RELEASE_TOK(tok); + break; } else { - gid = i+1; + RELEASE_TOK(tok); + return -1; } #ifdef XETEX font->ft_to_gid[i] = gid; @@ -738,6 +753,13 @@ parse_charstrings (cff_font *font, } } *start += len; + + tok = pst_get_token(start, end); + if (!MATCH_OP(tok, "ND") && !MATCH_OP(tok, "|-")) { + RELEASE_TOK(tok); + return -1; + } + RELEASE_TOK(tok); } if (mode != 1) charstrings->offset[count] = offset + 1; diff --git a/Build/source/texk/xdvipdfmx/src/truetype.c b/Build/source/texk/xdvipdfmx/src/truetype.c index f78fd3fdf75..0a1c164bca4 100644 --- a/Build/source/texk/xdvipdfmx/src/truetype.c +++ b/Build/source/texk/xdvipdfmx/src/truetype.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/truetype.c,v 1.4 2005/08/30 07:52:33 chofchof Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/truetype.c,v 1.5 2005/12/29 04:07:04 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. |