[XeTeX] how do I embed fonts into a a xelatex generated pdf?

Adam Russell arussell at cs.uml.edu
Thu May 3 20:02:29 CEST 2012


On 5/3/12 1:10 PM, xetex-request at tug.org wrote:
>> Date: Thu, 3 May 2012 11:08:00 +0200
>> From: Zdenek Wagner<zdenek.wagner at gmail.com>
>> To: Unicode-based TeX for Mac OS X and other platforms<xetex at tug.org>
>> Subject: Re: [XeTeX] how do I embed fonts into a a xelatex generated
>> 	pdf?
>> Message-ID:
>> 	<CAC1phybAu4bH1TL+yP+ExpOhJumnQ1Ms56Gh9mAP-LzdYGZxDQ at mail.gmail.com>
>> Content-Type: text/plain; charset="ISO-8859-2"
>>
>> Short answer: you have to buy Helvetica.
>>
>> Long answer: There are basic 15 PS fonts and basic 35 PDF fonts that
>> must be according to the specification available everywhere. However,
>> this requirement is broken even in Adobe products (the author of the
>> specification) and it is quite common to see different versions of
>> Times and Helvetica with different metrics (it cost me some money and
>> damaged output to discover this crucial problem). It is therefore
>> good (and required by DTP studios and printer houses) to embed all
>> fonts. These 35 basic fonts are commercial and thus cannot be
>> distributed with TeX. There are free replacements (from URW and other
>> vendors). Now you have two options:
>>
>> 1. Embed the replacement fonts possibly losing quality
>> 2. Do not embed the font and hope that the user has either the
>> commercial font or a replacement font that will not be worse.
>>
>> Of course option 1 is better unless you know that the user has the
>> commercial font with exactly the same metrics as you. You have to look
>> into the manual of your TeX distribution how to instruct it to embed
>> all fonts (it is done by updmap-sys in TeX Live). If you want to have
>> fonts with better quality, you can consider using TeX Gyre Heros
>> instead of Helvetica.
>>
>> Still one problem remains. You may include images created by tools as
>> gnuplot or inkscape that insert texts in Helvetica but do not embed
>> the font. It will need some tweaking depending on the tool.
> Ah! That is exactly my problem I now realize. My paper in and of itself
> does not use Helvetica but I am using
> gnuplot to generate figures. So, I guess I am going with (2). The use of
> Helvetica in the figures is so
> small that hopefully any difference will be so small as to be
> undetectable. I am willing to bet that Helvetica is a
> common enough font and gnuplot is a common enough tool that this
> shouldn't be an issue. We'll see...
> And also, just for the record, I found these directions on embedding
> fonts to be very clear:
> http://confsys.encs.concordia.ca/public_files/embeded_fonts.php
> Thank you very much for the help!
One final thing. I just discovered a clever workaround.
For the entire document run pdf2ps
pdf2ps document.pdf
and the run this command on the ps file
ps2pdf14 -dPDFSETTINGS=/prepress document.ps
This seems to work for embedding the fonts without having to regenerate 
anything!



More information about the XeTeX mailing list