[cairo] EPS Font Issues

Jeff Aigner jaigner at setnine.com
Thu Sep 2 10:09:24 PDT 2010


On 8/31/2010 7:40 PM, mpsuzuki at hiroshima-u.ac.jp wrote:
> On Wed, 1 Sep 2010 09:17:46 +0900
> mpsuzuki at hiroshima-u.ac.jp wrote:
>> On Tue, 31 Aug 2010 14:31:47 -0500
>> Jeff Aigner <jaigner at setnine.com> wrote:
>>> However when I try to output to EPS, I get the following
>>> message when opening the file up in Illustrator:
>>>
>>> f-0-0-Identity-H:
>>> Font not found on the system; missing font has been substituted
>>>
>>> I've looked all over for what exactly this means. The fonts I've been
>>> trying are on both the computer used to generate the EPS, and the
>>> computer opening the EPS file. In fact, in the case of TTF files,
>>> Illustrator will find the font and "replace" it -- however this doesn't
>>> seem to be happening with OTF files.
>>
>> I'm really unfamiliar with EPS feature coverage of
>> Illustrator, so please let me ask a stupid question:
>>
>> 	Illustrator can load embedded TrueType font (which
>> 	is NOT found in the operating system) from EPS?
>> 	If it can, what is the `standard' workflow to embed
>> 	a TrueType into EPS?
> 
> Hi,
> 
> Just I've tested with Adobe Illustrator CS4.
> I embedded DejaVu Sans + DejaVu Serif.
> 
> In RDF-formatted metadata part, I can find
> their specification as TrueType, like this:
> ---------------------------------------------
>         <xmpTPg:Fonts>
>             <rdf:Bag>
>                <rdf:li rdf:parseType="Resource">
>                   <stFnt:fontName>DejaVuSerif</stFnt:fontName>
>                   <stFnt:fontFamily>DejaVu Serif</stFnt:fontFamily>
>                   <stFnt:fontFace>Book</stFnt:fontFace>
>                   <stFnt:fontType>TrueType</stFnt:fontType>
>                   <stFnt:versionString>Version 2.2</stFnt:versionString>
>                   <stFnt:composite>False</stFnt:composite>
>                   <stFnt:fontFileName>DejaVuSerif.ttf</stFnt:fontFileName>
>                </rdf:li>
>                <rdf:li rdf:parseType="Resource">
>                   <stFnt:fontName>DejaVuSans</stFnt:fontName>
>                   <stFnt:fontFamily>DejaVu Sans</stFnt:fontFamily>
>                   <stFnt:fontFace>Book</stFnt:fontFace>
>                   <stFnt:fontType>TrueType</stFnt:fontType>
>                   <stFnt:versionString>Version 2.2</stFnt:versionString>
>                   <stFnt:composite>False</stFnt:composite>
>                   <stFnt:fontFileName>DejaVuSans.ttf</stFnt:fontFileName>
>                </rdf:li>
>             </rdf:Bag>
>          </xmpTPg:Fonts>
> ---------------------------------------------
> 
> But, the embedded font is not TrueType, it is converted
> to PostScript Type1, aslike:
> ---------------------------------------------
> %ADOBeginSubsetFont: DejaVuSans Initial
> %ADOt1write: (1.0.24)
> %%Copyright: Copyright 2010 Adobe System Incorporated. All rights reserved.
> 12 dict dup begin
> /FontType 1 def
> /FontName /DejaVuSans def
> /FontInfo 5 dict dup begin
> /ItalicAngle 0 def
> /FSType 0 def
> end def
> /PaintType 0 def
> /FontMatrix [0.001 0 0 0.001 0 0] def
> /Encoding 256 array
> 0 1 255 {1 index exch /.notdef put} for
> dup 32 /space put
> ...
> ---------------------------------------------
> 
> So, I guess, Illustrator write the referencial info
> of the original TrueType, and, subsetted/converted
> to PS Type1. I guess Illustrator cannot load embedded
> Type42/Type11 font from EPS (I'm not sure if embedded
> Type42/Type11 can be loaded from PDF), and reload
> the font from the system, out of the document.
> 
> --
> 
> Yet I've not checked the detail how RDF font list
> in EPS works, but EPS output of cairo can generate
> an EPS that Illustrator tries to restore the font from
> the system, it will be helpful.
> 
> Regards,
> mpsuzuki

I actually found a pycairo example in the docs, warpedtext.py which I
think solves my problem. In order to warp the next, it converts it to a
shape. I think if I "warp" it in a straight line, it will produce the
output I desire.

Kind Regards,

Jeff Aigner


More information about the cairo mailing list