From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Aug 14 14:10:01 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D8CC87B1 for ; Wed, 14 Aug 2013 14:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B92E92D82 for ; Wed, 14 Aug 2013 14:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7EEA1kD016751 for ; Wed, 14 Aug 2013 14:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7EEA12V016750; Wed, 14 Aug 2013 14:10:01 GMT (envelope-from gnats) Resent-Date: Wed, 14 Aug 2013 14:10:01 GMT Resent-Message-Id: <201308141410.r7EEA12V016750@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Takeo Tatsumi Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 88CBD66C for ; Wed, 14 Aug 2013 14:06:51 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 76B4F2D4D for ; Wed, 14 Aug 2013 14:06:51 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r7EE6pEj052378 for ; Wed, 14 Aug 2013 14:06:51 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r7EE6pnS052375; Wed, 14 Aug 2013 14:06:51 GMT (envelope-from nobody) Message-Id: <201308141406.r7EE6pnS052375@oldred.freebsd.org> Date: Wed, 14 Aug 2013 14:06:51 GMT From: Takeo Tatsumi To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/181292: dvipdfmx cannot long font name X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 14:10:02 -0000 >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: