[pdftex] AR 5 not working with pdftex?

Robert Howlett rhowlett at mail.usyd.edu.au
Sun Jun 3 20:25:08 CEST 2001


Hi,

The problem glyphs are precisely the ones for which the
character drawing routines use "callsubr", except for
the first one which uses this, namely fi.
Apparently the first use of this is OK, after that the
program gets confused.
In fact, if you print the characters that use "callsubr"
in order then the problem doesn't appear.

e.g. the following file was OK

\nopagenumbers

\char12 \char13 \char14 \char15 \char25 \char26 \char30 \char36
\char37 3 4 5 6 7 8 9 \char62 \char63
\bye

If the initial \char12 is left out then the problem
reappears.

Since the subroutines in question are only used once each,
it looks like it would be easy enough to hack the font to fix
things. (I don't understand the code very well myself, but that's
how things look to me.)

Bob

------------


Y&Y Support wrote:
> 
> Hi:
> 
> At 13:21 2001-06-02 -0400, Tom Kacvinsky wrote:
> 
> > Do you mean that ATM does not parse subroutine 4, but rather, when
> > it sees
> > subroutine 4 being called ina charstring, ATM uses its own internal
> > representation of subroutine 4 to activate hint replacement?
> 
> Details differ between different versions of ATM, but the basic idea
> is
> that ATM has no PS interpreter. Hence it cannot handle OtherSubrs e.g.
> It does interpret Subrs, of course, but when it gets to OtherSubrs,
> it assumes the first four are the "standard" ones used for FlexProc
> and hint replacement, and it ignores the rest.
> 
> > That is what I thought happened...
> >
> > But pdftex does not change this "linkage".  The last time I looked
> > at the
> > subsetting code in pdftex, it leaves the subroutine numbers alone,
> > and just
> > removes the routines that are not needed (so there are gaps in the
> > resultant
> > Type 1 font's Subrs array).
> 
> Which in itself is an "error" since some rasterizers crash or complain
> when the number of Subrs does not match the size of the Subrs Array.
> One might think that having too *large* an array should not cause a
> problem, but as a result of bad experience with previous PS
> interpreters,
> we don't allow any differences in size of Subrs and size of
> CharStrings.
> 
> So the pdfTeX problem may have nothing specifically to do with hint
> replacement, but use of Subrs in general (since the BSR/Y&Y/AMS
> CM fonts generally use Subrs *only* for hint replacement).
> 
> Regards, Louis.
> 
> > Tom
> >
> > On Sat, 2 Jun 2001, Y&Y Support wrote:
> >
> > > Interesting observation!
> > >
> > > At 23:36 2001-06-02 +1000, Robert Howlett wrote:
> > >
> > > >It seems that Acrobat Reader 5 objects only to some of the
> > > >characters in cmr10.pfb; specifically, characters
> > > >13, 14, 15, 25, 26, 30, 36, 37, 51, 52, 53, 54, 62, 63,
> > > >66, 71, 82, 83, 97, 98, 100, 103, 105, 106, 109, 110, 112,
> > > >113, 114, and 115.
> > >
> > > Looking at the glyphnames rather than the numeric codes:
> > > fl, ffi, ffl, germandbls, ae, OE, dollar, percent,
> > > three, four, five, six, questiondown, question,
> > > B, G, R, S, a, b, d, g, i, j, m, p, q, r, s ...(*)
> > >
> > > Anyone see the pattern?
> > >
> > > Those are characters that require hint replacement.
> > > For example, in the digit three, the upper bow is shifted
> > > left slightly relative to the lower box and so has to be hinted
> > > separately. Ditto for the upper and lower bowls in "B".
> > > And so on.
> > >
> > > Looking at the BSR/Y&Y/AMS et al fonts
> > > http://www.ams.org/index/tex/type1-fonts.html
> > > one sees that the above glyphs in CMR10.PFB
> > > all use hint replacements
> > > (the newer Y&Y versions
> > > http://www.yandy.com/river/setdetail-CM.htm
> > > have additional hint replacement code).
> > >
> > > The hint replacement is done via subroutine call.
> > > In "modern" Type 1 fonts (less than ten years old)
> > > this tends to be done via a standardized call to
> > > subroutine 4.
> > >
> > > Some software (such as ATM)
> > > --- which does not understand PostScript --- does not
> > > interpret the subroutines.  So if you change this
> > > linkage for hint replacement it will break things.
> > >
> > > I wouldn't be surprised if there is some cleverness in
> > > the output from pdfTeX that trips up Acrobat.
> > > When it comes to font handling it pays to
> > > "program to the lowest common denominator".
> > >
> > > Regards, Louis.
> > >
> > > (*) Actually the CMR10.PFB pulled off the AMS server
> > > also has hint replacement in fi, eight, nine, n and u.
> > > It's odd that those don't trigger the same problem,
> > > but maybe the test list given above wasn't quite complete...
> > >
> > > P.S. These "problems" with Acrobat 5 Reader do not
> > > occur with PDF files made using Y&Y TeX/DVIPSONE
> > > and Distiller 4 or Distiller 5.
> > >
> > > >  For all of these I got the "an error
> > > >occurred while downloading a font, the file may not
> > > >print correctly" message (on a document with just the
> > > >one character). Other characters were OK.
> > > >Putting << in the map file didn't actually solve the problem,
> > > >because the characters listed above were still substituted
> > > >by characters from Courier at printing. In particular,
> > > >ligatures that Courier doesn't have were missing.
> > > >
> > > >I tried using cmr10.ttf instead of cmr10.pfb. Sometimes
> > > >I still get the same error, sometimes I don't.
> > > >
> > > >Bob Howlett
> > > >
> > > >"Christopher S. Swingley" wrote:
> > > > >
> > > > > Than,
> > > > >
> > > > > > The map files that are listed in your pdftex.cfg (usually
> > under
> > > > > > $TEXMF/pdftex/config)
> > > > >
> > > > > Thanks, I found it in /etc/texmf/dvips/pdftex.map and changed
> > the '<'
> > > > > to '<<'.  This solves the problem with it being unable to
> > download
> > > > > one of the fonts (so the font isn't substituted in the
> > printout),
> > > > > but it causes another -- the ligatures are missing!  Acrobat
> > and
> > > > > Acrobat Reader 5.0 show them correctly on the screen, but
> > there is
> > > > > a blank space on the printed copy.
> > > > >
> > > > > Chris
> > > > > --
> > > > > Christopher S. Swingley         930 Koyukuk Drive
> > > > > System / Network Manager        University of Alaska Fairbanks
> > > > > IARC -- Frontier Program        Fairbanks, AK 99775
> > > > >
> > > > > phone: 907-474-2689             fax: 907-474-2643
> > > > > email: cswingle at iarc.uaf.edu    GNUPG and PGP2 keys at my web
> > site
> > > > >   web: http://www.frontier.iarc.uaf.edu/~cswingle
> > > > > _______________________________________________
> > > > > pdftex mailing list
> > > > > pdftex at tug.org
> > > > > http://tug.org/mailman/listinfo/pdftex
> > > >_______________________________________________
> > > >pdftex mailing list
> > > >pdftex at tug.org
> > > >http://tug.org/mailman/listinfo/pdftex
> > >
> > > --
> > > Y&Y Support mailto:support at YandY.com
> > http://www.YandY.com/unique.htm (PG)
> > >
> >
> > _______________________________________________
> > pdftex mailing list
> > pdftex at tug.org
> > http://tug.org/mailman/listinfo/pdftex
> 
> --
> Y&Y Support mailto:support at YandY.com http://www.YandY.com/unique.htm
> (PG)



More information about the pdftex mailing list