From: "Robert-André Mauchin" <zebob.m@pengzone.org>
To: ntg-context@ntg.nl
Subject: Error with some italic fonts: Parsing CFF DICT failed
Date: Wed, 20 May 2009 09:43:40 +0200 [thread overview]
Message-ID: <4A13B4AC.8010409@pengzone.org> (raw)
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
___________________________________________________________________________________
next reply other threads:[~2009-05-20 7:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-20 7:43 Robert-André Mauchin [this message]
2009-05-20 8:32 ` Taco Hoekwater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A13B4AC.8010409@pengzone.org \
--to=zebob.m@pengzone.org \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).