[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where and how do I install a TTF font?



Mumia W.."
> Sjoerd Hiemstra:
> > Nelson A. de Oliveira:
> > > Mumia W..:
> > > > See if you can get the barcode font embedded in the PDF file.
> > >
> > > The PDF is generated by a third part online system that we use
> > > here. We don't have control over the PDF.
> > > We want to change all machines running Windows to Linux, but the
> > > only missing thing is this barcode font on the PDFs. Windows
> > > displays them correctly while we couldn't make it works on
> > > Linux :-/
> > 
> > I work at a printshop where I have tools to take a closer look at
> > the pdf. It appears that *none* of the fonts are included or
> > embedded. These are: Times New Roman, Times New Roman Bold, Arial,
> > Arial Bold, Arial Bold Italic, Bar25if.  So none of these fonts are
> > guaranteed to look like the original on your screen.
> > Moreover, Bar25if could not be embedded due to "licensing
> > limitations".
> > 
> > This means that the pdf is simply a bad one, and not acceptable!
> > All fonts should be included, so the pdf will display well on a
> > system where these fonts are not installed.  That is precisely the
> > purpose of a pdf.
> > 
> > What I could do is to turn all characters into outlines
> > ('vectorize' the characters) so no fonts are needed, and make a new
> > pdf out of this. It's a big one: 4.3 MB, but if you can use it, get
> > it with this command:
> > 
> >     wget http://home.kpnplanet.nl/~shiems@kpnplanet.nl/giap.pdf
> > 
> > I suppose you could also do this with programs like pdfedit and 
> > inkscape.
> 
> I was also able to create a version of giap.pdf with the barcode font 
> rendered into the file. I hope it doesn't violate the distribution 
> restrictions. I actually don't know if the font is rendered or
> embedded, but I do know what I did to create the new version of the
> file.
> 
> First here is the file: 
> http://home.earthlink.net/~mumia.w.18.spam/giap3.pdf (272K)
> 
> I used ghostscript (gs-gpl). I set GS_FONTPATH to the directory in
> which Bar25if.ttf was located, and then I ran ghostscript with
> appropriate options:
> 
> export GS_FONTPATH=$PWD
> gs -dSAFER -sDEVICE=pdfwrite -sOutputFile=giap3.pdf giap.pdf
> unset GS_FONTPATH
> 
> Sjored, please tell me if this was done appropriately (not violating
> the license). I was hoping to get ghostscript to "vectorize" the
> barcode glyphs, but I really don't know /what/ ghostscript did.
> 
> Xpdf, evince and kpdf all show the barcodes just fine 8-)

Surprise: all the fonts in giap3.pdf are embedded correctly, not
rendered. So missing fonts can be added to a pdf this way.
The only thing that makes me scratch my head is some of gs's verbose
output:

    Substituting font Times-Roman for TimesNewRoman.
    Substituting font Times-Roman for TimesNewRoman,Bold.
    Substituting font Helvetica-Oblique for Arial,BoldItalic.
    Substituting font Helvetica for Arial,Bold.

So bold fonts have turned into regular in the resulting pdf, despite
the fact that they have been installed by the msttcorefonts package.
I guess it'll take some more study of how to make fonts available to
Ghostscript.

The 'licensing limitations' concern the fonts themselves. Many fonts,
including non-free, licensed ones, are allowed to be embedded into
pdf's. Then there are fonts that are not allowed to do so, but which
still can be included as a subset, i.e. only the used characters are
inserted, and those characters are not editable.
Finally, fonts exist that are not even allowed to be included as a
subset. It seems that the font that the OP posted was one of them.
But for most fonts it does not appear to be a problem to enclose them
in pdf's this way.



Reply to: