diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-11-26 13:03:54 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-11-26 13:03:54 +0000 |
commit | 81a97bf38006a36e3272a3852c0fa0b0b7377961 (patch) | |
tree | 0372c23237f90538cfb343cc6333c170827118e6 /Build | |
parent | e1c6f5df824c58c28dc2a2cd74809df4f2a0130f (diff) |
still more minor tweaks for writet1.c
git-svn-id: svn://tug.org/texlive/trunk@20575 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvipsk/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/writet1.c | 66 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/writet1.c | 7 |
4 files changed, 42 insertions, 39 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index 53382254211..b07a6ab624a 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -1,3 +1,7 @@ +2010-11-26 Peter Breitenlohner <peb@mppmu.mpg.de> + + * writet1.c: Still more minor tweaks. + 2010-11-26 Thanh Han The <thanh@river-valley.org> * writet1.c (t1_check_unusual_charstring): switch EOL to space diff --git a/Build/source/texk/dvipsk/writet1.c b/Build/source/texk/dvipsk/writet1.c index 2b075c685ae..4a792e525ee 100644 --- a/Build/source/texk/dvipsk/writet1.c +++ b/Build/source/texk/dvipsk/writet1.c @@ -689,44 +689,39 @@ static void t1_builtin_enc(void) { int i, a, b, c, counter = 0; char *r, *p; - /* - * At this moment "/Encoding" is the prefix of t1_line_array - */ - if (t1_suffix("def")) { /* predefined encoding */ + /* At this moment "/Encoding" is the prefix of t1_line_array */ + for (i = 0; i < 256; i++) + t1_builtin_glyph_names[i] = (char *) notdef; + if (t1_suffix("def")) { /* predefined encoding */ sscanf(t1_line_array + strlen("/Encoding"), "%256s", t1_buf_array); if (strcmp(t1_buf_array, "StandardEncoding") == 0) { - for (i = 0; i < 256; i++) - if (standard_glyph_names[i] == notdef) - t1_builtin_glyph_names[i] = (char*) notdef; - else - t1_builtin_glyph_names[i] = xstrdup(standard_glyph_names[i]); t1_encoding = ENC_STANDARD; + for (i = 0; i < 256; i++) { + if (standard_glyph_names[i] != notdef) + t1_builtin_glyph_names[i] = xstrdup(standard_glyph_names[i]); + } + return; } - else - pdftex_fail("cannot subset font (unknown predefined encoding `%s')", - t1_buf_array); - return; - } else - t1_encoding = ENC_BUILTIN; - /* - * At this moment "/Encoding" is the prefix of t1_line_array, and the encoding is - * not a predefined encoding - * - * We have two possible forms of Encoding vector. The first case is - * - * /Encoding [/a /b /c...] readonly def - * - * and the second case can look like - * - * /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for - * dup 0 /x put - * dup 1 /y put - * ... - * readonly def - */ - for (i = 0; i < 256; i++) - t1_builtin_glyph_names[i] = (char*) notdef; - if (t1_prefix("/Encoding [") || t1_prefix("/Encoding[")) { /* the first case */ + pdftex_fail("cannot subset font (unknown predefined encoding `%s')", + t1_buf_array); + } + /* At this moment "/Encoding" is the prefix of t1_line_array, and the encoding is + * not a predefined encoding. + * + * We have two possible forms of Encoding vector. The first case is + * + * /Encoding [/a /b /c...] readonly def + * + * and the second case can look like + * + * /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for + * dup 0 /x put + * dup 1 /y put + * ... + * readonly def + */ + t1_encoding = ENC_BUILTIN; + if (t1_prefix("/Encoding [") || t1_prefix("/Encoding[")) { /* the first case */ r = strchr(t1_line_array, '[') + 1; skip(r, ' '); for (;;) { @@ -1180,7 +1175,8 @@ static void t1_subset_ascii_part(void) if (t1_encoding == ENC_STANDARD) t1_puts("/Encoding StandardEncoding def\n"); else { - t1_puts("/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\n"); + t1_puts + ("/Encoding 256 array\n0 1 255 {1 index exch /.notdef put} for\n"); for (i = 0, j = 0; i < 256; i++) { if (is_used_char(i) && t1_glyph_names[i] != notdef) { j++; diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index 297055a2688..9489887f4ed 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,7 @@ +2010-11-26 Peter Breitenlohner <peb@mppmu.mpg.de> + + * writet1.c: Still more minor tweaks. + 2010-11-26 Thanh Han The <thanh@river-valley.org> * writet1.c (t1_check_unusual_charstring): switch EOL to space diff --git a/Build/source/texk/web2c/pdftexdir/writet1.c b/Build/source/texk/web2c/pdftexdir/writet1.c index 9701b01de2d..dd38ede6007 100644 --- a/Build/source/texk/web2c/pdftexdir/writet1.c +++ b/Build/source/texk/web2c/pdftexdir/writet1.c @@ -793,10 +793,9 @@ static char **t1_builtin_enc(void) glyph_names[i] = xstrdup(standard_glyph_names[i]); } return glyph_names; - } else - pdftex_fail - ("cannot subset font (unknown predefined encoding `%s')", - t1_buf_array); + } + pdftex_fail("cannot subset font (unknown predefined encoding `%s')", + t1_buf_array); } /* At this moment "/Encoding" is the prefix of t1_line_array, and the encoding is * not a predefined encoding. |