diff options
Diffstat (limited to 'Build/source/texk/dvipdfmx/src/mpost.c')
-rw-r--r-- | Build/source/texk/dvipdfmx/src/mpost.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/Build/source/texk/dvipdfmx/src/mpost.c b/Build/source/texk/dvipdfmx/src/mpost.c index 16a60a54b50..6875d5d573e 100644 --- a/Build/source/texk/dvipdfmx/src/mpost.c +++ b/Build/source/texk/dvipdfmx/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) |