diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2012-08-21 10:22:37 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2012-08-21 10:22:37 +0000 |
commit | ec27f770da4a3bf287560dfa325f21f3e54804bf (patch) | |
tree | 633b4dbcb99cf5d3fca515f68caddd9bc89bc0a6 | |
parent | 082ace17e3f07493aa8d2009987e922a1c2b9746 (diff) |
support large truetype fonts
git-svn-id: svn://tug.org/texlive/trunk@27482 c570f23f-e606-0410-a88d-b1316a301751
-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++; } |