[pdftex] font strategy in pdftex

Mark A. Wicks mwicks at kettering.edu
Tue Feb 13 09:59:10 CET 2001


On Tue, 13 Feb 2001, Kuznetsov A,V. wrote:

> Dear pdftex developers,
> I found excessive font embedding in documents
> produced by pdftex.
> 
[snip]
>         ptmr8r   Times-Roman   <8r.enc
>         ptmr8r17 <tir_____.pfb <8r.enc ".97 ExtendFont"
>         ptmr8r9  <tir_____.pfb <8r.enc "1.03 ExtendFont"
>         ptmr8r8  <tir_____.pfb <8r.enc "1.07 ExtendFont"
>         ptmr8r7  <tir_____.pfb <8r.enc "1.11 ExtendFont"
...
[snip]
> As seen, only the standard font is used.
> 
> The results are dramatically different.
> Neither dvipdfm nor dvips+distiller embed standard resource
> but pdftex embeds it six times. Why? Only Tz operator should
> change horizontal scaling when an extended font is used
[snip]
> What is the reason for the excessive font embedding in pdftex?

   I am not a pdftex developer, but I think I understand the problem
pretty well. You are correct that Tz can change the horizontal scaling to
implement ExtendFont, but that doesn't solve the more general problem.  
What about SlantFont, for example?  If I recall correctly, PDF, unlike
PostScript, does not allow the font matrix to be modified on the fly.  
The slant of the font is determined from the font matrix contained in the
embedded font. I believe that the only way to change the font matrix is to
re-embed a new copy of the font using different font matrix for each
instance, and that's apparently what pdftex is doing.

   Dvipdfm and Distiller handle this by modifying the graphics state
rather than the text state.  Having implemented this in dvipdfm, I know
that this is very difficult to get right (I'll explain the issues to
anybody who wants to know), and it produces some unnatural looking PDF
output streams. However, it does produce the right result and allows the
font to be embedded only once.

> Moreover, such a font strategy leads to incorrect result.
> Printer (or viewer) font will be used for unextended font
> while creator's font is embedded for extended fonts. As it was

   Can't you explicitly embed the font in the unextended case?
e.g.,

         ptmr8r <tir_____.pfb <8r.enc
instead of
         ptmr8r   Times-Roman   <8r.enc> 





More information about the pdftex mailing list