[Fontinst] Compile error when generating LY1 ITC LegacySans

Lars Hellström Lars.Hellstrom at math.umu.se
Tue Jul 20 23:15:16 CEST 2004

At 18.07 +0200 04-07-20, Ulrich Dirr wrote:
>Lars Hellström wrote:
>> At 10.48 +0200 04-07-20, Ulrich Dirr wrote:
>>> Hi,
>>> I'm trying to setup fontinst for ITC LegacySans. I've already
>>> generated/tested it successfully with T1 encoding. In addition I
>>> want
>>> the TeX fonts with LY1 encoding. But I always got error messages
>>> :-(
>>> Maybe someone can help me?
>>> My drive file looks like (later I want to expand the installfont
>>> commands by extra kerning data files etc.):
>>> ---------------------------------------------------------------------
>>> [snip] \input finstmsc.sty
>>> \declarepsencoding{LY1}{TeXnANSIEncoding}{\download{texnansi.enc}}
>> That should be
>>  \declarepsencoding{8y}{TeXnANSIEncoding}{\download{texnansi.enc}}
>> since the encoding name is 8y as far as fontinst is concerned.
>> However this
>> would only be needed if you reencoded (\reencodefont) to 8y, which
>> you don't do in that driver file.
>Ok, that was from my old version of the driver file. I wasn't sure if
>I need to reencode 8a to 8r first. But if I understand it correctly
>this is not needed with LY1/8y.

The usual way of making LY1-encoded fonts would, as Walter wrote, have been
to use \installrawfont. Since this means not making a virtual font at all
it wouldn't allow fiddling around with the glyphs, only adjusting the
metrics. Since you want to make a virtual font, you will have to base it on
a differently named base font, and the simplest set-up there does indeed
seem to be to use 8r for the encoding of this base font.

>>> \resetstr{PSfontsuffix}{.pfb}
>>> \adddriver{dvips}{ilz.map}
>>> \input ilz-map
>>> \donedrivers
>>> \bye
>>> ---------------------------------------------------------------------
>>> My log file looks like:
>> [snip]
>>> \openout0 = `ilzki8y.vpl'.
>>> (p:/TeXLive/texmf/tex/generic/fontinst/latinetx/8y.etx
>>> ! Missing control sequence inserted.
>>> <inserted text>
>>>                \inaccessible
>>> <to be read again>
>>>                   1
>>> <argument> ...f \1.0pt-ilzk8a =\font_count \xdef 1
>>> .0pt-ilzk8a{1.0pt-ilzk8a}\...
>>> \sixth_of_six #1#2#3#4#5#6->#6
>>> \do_slot ...\slot_name \then \mapfonts \slot_name
>>>                                                  \fi
>>> l.135 \setslot{dotaccent}
>>> ? e
>> OK, that's a weird error. However when I test your driver file
>> (letting ptm
>> substitute for ilz) I don't get it, so there must be something
>> different at
>> your end. Are there any hacks that you're using? It looks as though
>> \saved_mapfont has been \vpl_mapfont at a time when it is supposed
>> to be
>> unexpandable.
>> One thing you can try is to create a file test.etx with the
>> following contents
>> \relax
>> \encoding
>> \expandafter\show \csname g-fraction\endcsname
>> \expandafter\show \csname g-dotaccent\endcsname
>> \endencoding
>> and change {8y} in the \installfont for ilzki8y to {test,8y}. This
>> will
>> show what the \mapfonts information of the glyph really is, which
>> should
>> help in tracking down what goes wrong.
>I've attached my working dir as a ZIP file with the new output.

OK, it looks about as I would have expected, but as to why the \mapfonts
info ended up like that ...  I can't reproduce the error at my end; the
files you sent work fine.

One thing that *could* be the cause of your troubles is a typo in 8y.etx
that was discussed last December on this list: there are two \setslot
commands with numeric arguments that should really be \nextslot commands.
(This throws off a lot of grouping and might be enough for fontinst to have
the wrong definition of \saved_mapfonts when processing the second font of
the run.)

>didn't use any hacks so far. I wanted to go step by step to a more
>complicated setup (later I wanted to include extra kerning data and
>another font with special glyphs, etc.).
>>> No pages of output.
>>> ---------------------------------------------------------------------
>>> Besides that I don't know if the fake bold & bolditalic smallcaps
>>> font will work (there's only a t1c file and no ly1c),
>> If you have a look at t1c.etx, you should be able to see how to make
>> a ly1c.
>>> my assumption was
>>> that with LY1 encoding I don't need to first transform fonts from
>>> 8a
>>> to 8r. Maybe someone can clarify this too.
>> That will probably not help much. The reason one reencodes from 8a
>> to 8r is
>> that many common glyphs are not accessible in the 8a encoding, and
>> what
>> encoding you use for the virtual font built on top makes no
>> difference for
>> that. The step that the proponents of LY1 usually want to get  rid
>> of is the
>> virtual font rather than the reencoding.
>Yes, I understand that it was this YandY philosophy. But nevertheless
>I need to build the final font from different sources, e.g., I have an
>extra font with additional ff, ffi, and ffl ligatures.
>Does your statement mean that all glyphs in the 8a afm files with C -1
>aren't accessable by fontinst?

It is not as much "not accessable by fontinst" as "not accessable by a
virtual font" and "not accessable by the driver" (the PostScript commands
generated by dvips to print text can only select glyphs by character code
in the interval 0-255), but yes, you can't use those characters.

>Then I would need to reencode them
>first to 8r? Or do I need another raw encoding suitable for LY1?
>(sorry I'm confused)

I think 8r and 8y are equivalent in the set of glyphs they provide, so 8r
would do.

>BTW do you think that the attached T1LegacySans.tex driver file
>correct? (for my understanding it's ok)

I'd place the fontinst.sty and the finstmsc.sty parts in separate files and
do two different runs, also the \input ilz-map in the second part should be
ilz8y-rec (since that's what the file is called in the first part), but
apart from that it seems correct.

Lars Hellström

More information about the fontinst mailing list