* Error with some italic fonts: Parsing CFF DICT failed
@ 2009-05-20 7:43 Robert-André Mauchin
2009-05-20 8:32 ` Taco Hoekwater
0 siblings, 1 reply; 2+ messages in thread
From: Robert-André Mauchin @ 2009-05-20 7:43 UTC (permalink / raw)
To: ntg-context
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Error with some italic fonts: Parsing CFF DICT failed
2009-05-20 7:43 Error with some italic fonts: Parsing CFF DICT failed Robert-André Mauchin
@ 2009-05-20 8:32 ` Taco Hoekwater
0 siblings, 0 replies; 2+ messages in thread
From: Taco Hoekwater @ 2009-05-20 8:32 UTC (permalink / raw)
To: mailing list for ConTeXt users
Robert-André Mauchin wrote:
>
> * 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 for the analysis, that saves me a lot of work. I will add
that patch in the next bugfix release of luatex (end of next
week seems a likely release date for 0.40.2).
Best wishes,
Taco
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-20 8:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-20 7:43 Error with some italic fonts: Parsing CFF DICT failed Robert-André Mauchin
2009-05-20 8:32 ` Taco Hoekwater
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).