[pdftex] Problems with pdftex.map

Reinhard Kotucha reinhard at kammer.uni-hannover.de
Fri May 17 00:49:31 CEST 2002


>>>>> "rhowlett" == rhowlett  <rhowlett at mail.usyd.edu.au> writes:
      
    > [...]
    > And this from Mark Wicks:
    > [...]

    >    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.

I think it is possible to change the FontMatrix on the fly using the
Tm operator.

I just prepared the following file:

---------------------------------------------------------------
\pdfcompresslevel=0
\font\a=pplr at 10bp
\nopagenumbers
\a a \pdfliteral{1 0 0.2 1 0 0 Tm} b
\bye
---------------------------------------------------------------

The \pdfliteral first ends the text (ET) and afterwards begins a new
one (BT).
That looks like this:

---------------------------------------------------------------
stream
1 0 0 1 91.925 759.927 cm
BT
/F52 10 Tf 0 0 Td[(a)]TJ
ET
1 0 0 1 5 0 cm
1 0 0.2 1 0 0 Tm
BT
/F52 10 Tf 0 0 Td[(b)]TJ
ET
endstream
endobj
---------------------------------------------------------------

I carefully moved the line

1 0 0.2 1 0 0 Tm

behind "/F52 10 Tf" resulting in:

---------------------------------------------------------------
stream
1 0 0 1 91.925 759.927 cm
BT
/F52 10 Tf 0 0 Td[(a)]TJ
ET
1 0 0 1 5 0 cm
BT
/F52 10 Tf 1 0 0.2 1 0 0 Tm 0 0 Td[(b)]TJ
ET
endstream
endobj
---------------------------------------------------------------

The result was an upright "a" and a slanted "b" with the font only
loaded once.  AR was able to display it.

Thanh, are there any problems using the Tm operator to change the
FontMatrix rather than modifying the font itself?  I think it's even
easier to implement.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			               Phone: +49-511-751355
Berggartenstr. 9
D-30419 Hannover	              mailto:reinhard at kammer.uni-hannover.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------





More information about the pdftex mailing list