[Fontinst] ITC Galliard CC - ff, ffi & ffl ligatures

Lars Hellström Lars.Hellstrom at residenset.net
Tue Apr 28 16:46:55 CEST 2009


Christopher Adams skrev:
> I would like to take this opportunity to thank you all. You've been
> extraordinarily helpful and patient with my questions!
> 
> 
> Lars, I must not understand how to use your code. Do I put that in an .etx
> file like {t1fglalt.etx} and call it instead of t1? Like this:
> 
> \installfont{fglr8t}{fglr8r,fglra,newlatin}{t1fglalt}{T1}{fgl}{m}{n}{}

That was the intent, yes.

> The script then halts with the error:
> 
> Reglyphed metrics written on fglria.mtx.
> (./fglr8r.mtx) (./fglra.mtx)
> (/usr/share/texmf-texlive/tex/fontinst/latinmtx/newlatin.mtx
> (/usr/share/texmf-texlive/tex/fontinst/latinmtx/llbuild.mtx
> (/usr/share/texmf-texlive/tex/fontinst/latinmtx/ltcmds.mtx))
> (/usr/share/texmf-texlive/tex/fontinst/latinmtx/lubuild.mtx)
> (/usr/share/texmf-texlive/tex/fontinst/latinmtx/lsbuild.mtx)
> (/usr/share/texmf-texlive/tex/fontinst/latinmtx/lsfake.mtx)
> (/usr/share/texmf-texlive/tex/fontinst/latinmtx/lsmisc.mtx)
> (/usr/share/texmf-texlive/tex/fontinst/latinmtx/ltpunct.mtx))
> (./t1fglalt.etx
> ! Extra \fi.
> l.1 \encoding
> 
> Even if I comment out all of the \nextslot and \setslot commands, the error
> is the same. How should I be using your code?

Silly typo: \relax should be before \encoding, not after it.


>> >
>> > Can you please do t1testpage on the fonts and place the ps files online.
>> >
> 
> I installed t1testpage and ran it over GalliardAltCC-Roman {fglra8a}. I've
> placed the results here:
> 
> http://dl.getdropbox.com/u/471556/fonts/GalliardAltCC-Roman.ps
> 
> You can see the fj ligature sitting in slot j. ff, fi, fl, ffi & ffl are in
> slots V, W, X, Y & Z.
> 
> I also ran this over the Roman and OSF fonts, but the resulting .ps file
> only seems to contain the last 118 glyphs. (from emdash to zcaron) Why is
> that?
> 
> ==
> 
> I have been able to insert the ff, ffi & ffl ligatures into the Roman by
> following Dr. Rees's advice and using reglyphfonts. The relevant portions of
> my fontinst script are as follows:
> 
> 
> %%%%%%%%
> \transformfont{fglr8r}{\reencodefont{8r}{\fromafm{fglr8a}}} %Roman
> \transformfont{fglri8r}{\reencodefont{8r}{\fromafm{fglri8a}}} %Italic
> \transformfont{fglra8r}{\reencodefont{8r}{\fromafm{fglra8a}}} % Alt Roman
> \transformfont{fglria8r}{\reencodefont{8r}{\fromafm{fglria8a}}} % Alt Italic

If all glyphs in fglra8a and fglria8a are already in a slot, then 
there's no need to reencode them; just use the 8a fonts directly. This 
is related to the 8r.enc issue below.

BTW, is 8a the proper encoding variant for the Alt fonts? I suspect 7a 
would be more characteristic of what's really in there.

> \relax
> \reglyphfonts
>     \renameglyph{ff}{V}
>     \renameglyph{ffi}{Y}
>     \renameglyph{ffl}{Z}
>     \renameglyph{fj}{j} % Useless for now, because t1.etx has no slot for
> this
>     \reglyphfont{fglra}{fglra8r}
>     \reglyphfont{fglria}{fglria8r}
> \endreglyphfonts
> 
> 
> %these instructions use t1fgl.etx, which for now is an exact copy of t1.etx
> \installfonts
> \installfamily{T1}{fgl}{}
> \installfont{fglr8t}{fglr8r,fglra,newlatin}{t1fgl}{T1}{fgl}{m}{n}{}
> \installfont{fglrc8t}{fglrc8r,fglr8r suffix
> lining,newlatin}{lining,t1fgl}{T1}{fgl}{m}{sc}{}
> \installfont{fglri8t}{fglri8r,fglria,newlatin}{t1fgl}{T1}{fgl}{m}{it}{}
> \endinstallfonts
> 
> \installfonts
> \installfamily{TS1}{fgl}{}
> \installfont{fglr8c}{fglr8r,fglrc8r suffix
> oldstyle,textcomp}{ts1}{TS1}{fgl}{m}{n}{}
> \installfontas{fglr8c}{TS1}{fgl}{m}{sc}{}
> \installfont{fglri8c}{fglri8r,fglrij8r suffix
> oldstyle,textcomp}{ts1}{TS1}{fgl}{m}{it}{}
> \endinstallfonts
> 
> [...] % removed install commands for {fglj}
> 
> \endrecordtransforms
> \bye
> %%%%%%%%
> 
> Now, about the fj ligature...
> 
> I tried editing t1fgl.etx and adding a slot for the fj ligature. As a base
> case I simply switched all instances of {FI}{fi} with {FJ}{fj}, and sure
> enough the fj ligature appeared for all instances of fi in my test file.
> 
> I then tried removing one of the slots (dotlessj, I believe) and setting a
> new slot for fj, following the syntax for the other f ligatures, and while
> my testfile compiled all the glyphs seemed to be shifted over, so the wrong
> glyphs were being placed. 

Sounds like you changed the total number of \setslot commands; ETX 
files are kind of fragile that way. Try LaTeXing t1fgl.etx and see how 
the slot numbers come out, then compare with an unmodified t1.etx.


> >For the fj ligature, you have to iclude it in the 8r.enc vector.

Actually he doesn't, since the glyph name in the font (and thus 
everywhere on the PS side) isn't `fj' but `j'.

> I'm afraid I don't understand what this means.

8r.etx, when referenced from \reencodefont{8r}{...}, tells fontinst how 
to assign slot numbers to glyphs. 8r.enc, which dvips tends to include 
in its output, tells postscript how to do the same. These two have to 
match, or some glyphs could come out wrong.

I think Plamen was thinking along the lines of you needing to modify 
8r.etx (BAD IDEA, I'd say) and then pointing out that 8r.enc would need 
to be modified accordingly.

Lars Hellström


More information about the fontinst mailing list