[OS X TeX] [OT] Embedding fonts in images

Charilaos Skiadas cskiadas at gmail.com
Wed Mar 12 07:47:02 EDT 2008

On Mar 12, 2008, at 4:04 AM, Bruno Voisin wrote:

> Le 12 mars 08 à 05:13, Charilaos Skiadas a écrit :
>> I don't actually use simpdftex personally, though I guess I could,  
>> but I still think this will not solve the problem of the  
>> illustrations not having the fonts embedded (this is what Richard  
>> refers to in the last paragraph I think). I'll give it a try  
>> though when I get a moment. For now I found a workaround,  
>> essentially forcing R to not use Times but instead to use the URW  
>> equivalent. That ghostscript could embed just fine. Still no go  
>> with Zapf Dingbats, but I just managed to not use that at all (by  
>> using png instead of pdf).
>> I suppose the problem might be that in my system ghostscript  
>> doesn't actually know about Helvetica, Times etc, only about their  
>> URW equivalents? So it was not embedding the fonts when  
>> encountering Helvetica or Times.
> Do you mean your publisher is not happy about R embedding the URW  
> clones of Times, Helvetica, Zapf Dingbats and the like, in the PDF  
> files that it creates, instead of the original fonts themselves?  
> That's exactly what pdfTeX does by default, by the way, and what  
> TeX + dvips + ps2pdf do when instructed to do so via:
> sudo -H updmap-sys --setoption dvipsDownloadBase35 true
> namely embedding URW clones (Nimbus and the like) instead of the  
> original fonts (Times and the like).
> From interaction with publishers, my impression was that most of  
> them don't care so much about fonts: most of the time you see  
> instructions mentioning use of Times New Roman, Arial, etc., but  
> that's just because these are the fonts shipped with Windows. If  
> you use instead Times, Helvetica, etc., even if there are indeed  
> differences between the two sets of fonts in every point of detail,  
> generally the publishers won't care. Similarly I would have thought  
> (and have experienced in my case) that publishers wouldn't care if  
> you used URW clones instead.

Well R itself would not embed the fonts, but it has a command  
(embedFonts) that runs gs on the background to get the font embedded.  
So when I was telling R to use Helvetica or Times, the embedding in  
that second step was not taking place. When I told R explicitly to  
use the URW clones, that part did indeed work and those fonts were  
embedded, but originally I was simply telling it to use Times, and  
that was not doing the trick (i.e. the close were not automatically  
substituted and embedded by gs.

I did not however find a way to do the same with Zapf Dingbats. R  
uses that font in many drawing places, for points, even for some  
lines it seems. I haven't yet found a way to force it to use a  
substitute there, but luckily that doesn't happen in too many places.  
I'll probably have to ask the R list about it.

Luci's idea of printing to pdf seems to work indeed, thanks Luci (it  
ends up with embedded TrueType fonts, but that's fine by me at  
least ;) )! There's too many files, but hopefully most of them will  
only be using Times, and those I can automate to use the clones instead.

Hm, I suppose I can probably just print the overall book, with any  
chance. Just tried it now, and it seems to do the trick, in just one  
step! However, the publisher needs the individual image files, so I'd  
have to do it manually on each file.

> If you really want to get Ghostscript to use the actual fonts  
> Times, Helvetica etc., that's another story. I haven't (and won't)  
> try to do so myself, but there have been posts in which Peter  
> Dyballa gave indications on the procedure. See in particular:
> <http://tug.org/pipermail/macostex-archives/2005-May/015284.html>
> <http://tug.org/pipermail/macostex-archives/2005-July/016499.html>
> It seems you need to:
> - Convert the font suitcases like /System/Library/Fonts/Times.dfont  
> to a format that GhostScript can use (such as PFB). Beware: this  
> would most likely be an infringement of the OS X license.

> - Place symlinks to the converted files inside /usr/local/share/ 
> ghostscript/fonts.
> - Modify /usr/local/share/ghostscript/8.57/lib/Fontmap.GS accordingly.
> IMO that's really not worth the effort, the URW clones are good  
> enough for that matter.

Yeah, I definitely don't want to go there.

> Another possibility is to resort to commercial software (Adobe  
> Illustrator or Acrobat Professional), and perform font substitution  
> from there. I haven't tried myself, but this seems a logical step  
> to take.

It would have been, if printing doesn't do the trick. Though I really  
wanted to avoid using such software.

What drives me nuts so to speak is that this is a step that in my  
view would be trivial for publishers to perform, and a pain for  
authors to figure out  and perform. So I just can't understand why  
publishers ask this of the authors, especially when it comes to the  
standard 14 font set. Surely the publishers have one of these  
commercial software that does the trick?

Thanks to everyone for their very helpful suggestions.

> Hope this helps,
> Bruno Voisin

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College

More information about the MacOSX-TeX mailing list