diff options
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvipdfmx/ChangeLog.TL | 5 | ||||
-rw-r--r-- | Build/source/texk/dvipdfmx/src/tt_post.c | 16 |
2 files changed, 19 insertions, 2 deletions
diff --git a/Build/source/texk/dvipdfmx/ChangeLog.TL b/Build/source/texk/dvipdfmx/ChangeLog.TL index caba3bc7a4b..91ed5c483b8 100644 --- a/Build/source/texk/dvipdfmx/ChangeLog.TL +++ b/Build/source/texk/dvipdfmx/ChangeLog.TL @@ -1,3 +1,8 @@ +2012-08-21 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * tt_post.c (read_v2_post_names): support large truetype fonts + which are strictly speaking out of spec, idx > 32767. + 2012-08-21 keiichirou shikano <k16.shikano@gmail.com> * src/cff.c, src/cff.h. src/type1.c: fix type1 SEAC bug. diff --git a/Build/source/texk/dvipdfmx/src/tt_post.c b/Build/source/texk/dvipdfmx/src/tt_post.c index 418854e3861..98676350792 100644 --- a/Build/source/texk/dvipdfmx/src/tt_post.c +++ b/Build/source/texk/dvipdfmx/src/tt_post.c @@ -50,8 +50,20 @@ read_v2_post_names (struct tt_post_table *post, sfnt *sfont) idx = sfnt_get_ushort(sfont); if (idx >= 258) { if (idx > 32767) { - WARN("TrueTypes post table name index %u > 32767", idx); - idx = 0; + /* Although this is strictly speaking out of spec, it seems to work + and there are real-life fonts that use it. + We show a warning only once, instead of thousands of times */ + static char warning_issued = 0; + if (!warning_issued) { + WARN("TrueTypes post table name index %u > 32767", idx); + warning_issued = 1; + } + /* In a real-life large font, (x)dvipdfmx crashes if we use + nonvanishing idx in the case of idx > 32767. + If we set idx = 0, (x)dvipdfmx works fine for the font and + created pdf seems fine. The post table may not be important + in such a case */ + idx = 0; } post->count++; } |