From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/50623 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Robert-Andr=E9_Mauchin?= Newsgroups: gmane.comp.tex.context Subject: Error with some italic fonts: Parsing CFF DICT failed Date: Wed, 20 May 2009 09:43:40 +0200 Message-ID: <4A13B4AC.8010409@pengzone.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1242805505 24577 80.91.229.12 (20 May 2009 07:45:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 May 2009 07:45:05 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed May 20 09:44:58 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1M6gTx-0005Ej-MV for gctc-ntg-context-518@m.gmane.org; Wed, 20 May 2009 09:44:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3EBA91FE12; Wed, 20 May 2009 09:44:56 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 18258-02; Wed, 20 May 2009 09:44:22 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9B7FC1FDE2; Wed, 20 May 2009 09:44:22 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1A9041FDDB for ; Wed, 20 May 2009 09:44:21 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 18257-02 for ; Wed, 20 May 2009 09:44:12 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by ronja.ntg.nl (Postfix) with ESMTP id 0CBA51FDD3 for ; Wed, 20 May 2009 09:44:12 +0200 (CEST) Original-Received: from relay3-v.mail.gandi.net (relay3-v.mail.gandi.net [217.70.178.77]) by filter2-ams.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n4K7i350017016 for ; Wed, 20 May 2009 09:44:06 +0200 Original-Received: from localhost (mfilter4-v.gandi.net [217.70.178.38]) by relay3-v.mail.gandi.net (Postfix) with ESMTP id D298BBA18 for ; Wed, 20 May 2009 09:44:02 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter4-v.mgt.gandi.net Original-Received: from relay3-v.mail.gandi.net ([217.70.178.77]) by localhost (mfilter4-v.mgt.gandi.net [217.70.178.38]) (amavisd-new, port 10024) with ESMTP id e5h2NvORM3nK for ; Wed, 20 May 2009 09:44:01 +0200 (CEST) Original-Received: from [192.168.10.51] (ip-201.net-89-3-63.rev.numericable.fr [89.3.63.201]) by relay3-v.mail.gandi.net (Postfix) with ESMTP id CE779BA14 for ; Wed, 20 May 2009 09:43:59 +0200 (CEST) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=217.70.178.77; country=FR; region=A8; city=Paris; latitude=48.8667; longitude=2.3333; http://maps.google.com/maps?q=48.8667,2.3333&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 228811128 - 95388c33a200 - 20090520 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:50623 Archived-At: Hi, So I finally understand how to use my system fonts with Context (the --reload thing was not working), in order to use URW fonts, especially Nimbus Roman ones (I know there are TexGyre versions but that's not the point). * Here is my code : % engine=luatex \starttypescript [serif] [nimbus] [name] \definefontsynonym [Serif] [n021003l] \definefontsynonym [SerifBold] [n021004l] \definefontsynonym [SerifItalic] [n021023l] \definefontsynonym [SerifBoldItalic] [n021024l] \stoptypescript \definetypeface[basic][rm][serif][nimbus] \setupbodyfont[basic,12pt] \starttext blah blah blah \stoptext * When I compile this with Context, I get the following error : !LuaTeX error (file /usr/local/tex/texmf/fonts/data/default/Type1/n021023l.pfb): Parsing CFF DICT failed. (error=-3) ==> Fatal error occurred, no output PDF file produced! MTXrun | fatal error, return code: 70 It happens with other italic URW fonts, such as Palladio. * Googling a bit the error message, I found a similar error message but with Xetex (http://www.tug.org/pipermail/xetex/2008-March/009000.html ): >> OK, I think I have figured out what's wrong. The italic version >> of the font has an empty StemSnapV array in its PS Private data, >> and this stumbles xdvipdfmx which assumes every operator should >> be preceded by some operands. Particularly I think this is a bug >> in xdvipdfmx: although the specification doesn't say explicitly >> that dictionary keys with no value are allowed, other tools >> (e. g. TTX or FontForge) seem to have no problems with this >> situation. >> >> So my opinion is that the CFF_ERROR_STACK_UNDERFLOW error should >> not be triggered at the line 305 of cff_dict.c, if stack_top is 0. > > Thanks for your analysis of the issue. You are right, it is unclear > from the CFF spec whether an operator like StemSnapV should be > allowed with no operands; it doesn't really make any sense, but on > the other hand it should be harmless. * So I searched in the luatex code to find the culprit, source/texk/web2c/luatexdir/font/writecff.c, where you might include a similar hack as in xdvipdfmx (http://scripts.sil.org/svn-view/xdvipdfmx/TRUNK/src/cff_dict.c?view=markup ) Thanks ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________