Date: Wed, 14 Aug 2013 14:06:51 GMT From: Takeo Tatsumi <ttmtko@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/181292: dvipdfmx cannot long font name Message-ID: <201308141406.r7EE6pnS052375@oldred.freebsd.org> Resent-Message-ID: <201308141410.r7EEA12V016750@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 181292 >Category: ports >Synopsis: dvipdfmx cannot long font name >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Aug 14 14:10:01 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Takeo Tatsumi >Release: FreeBSD-9.1-RELEASE >Organization: Waseda University >Environment: FreeBSD tt.localdomain 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243826: Tue Dec 4 06:55:39 UTC 2012 root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: dvipdfmx-20110311 is unable to read large list of glyphs. cf. http://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=917 >How-To-Repeat: everytime. >Fix: To avoid this, use this patch file following. ----cut here---- --- ./work/dvipdfmx-20110311/src/tt_post.c.orig 2011-03-06 12:14:15.000000000 +0900 +++ ./work/dvipdfmx-20110311/src/tt_post.c 2013-07-14 12:55:46.000000000 +0900 @@ -42,2 +42,3 @@ int len; + int maxidx = 257; @@ -51,7 +52,20 @@ if (idx >= 258) { + if (idx > maxidx) + maxidx = idx; if (idx > 32767) { - WARN("TrueTypes post table name index %u > 32767", idx); + /* 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++; } @@ -59,2 +73,3 @@ } + post->count = maxidx - 257; ----cut here---- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308141406.r7EE6pnS052375>