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

cfrees at imapmail.org cfrees at imapmail.org
Mon Apr 27 14:57:02 CEST 2009

On Mon 27th Apr, 2009 at 19:00, Christopher Adams seems to have written:

> Dear all,
> As my very first fontinst project, I'm trying to work with the typeface ITC
> Galliard from Carter & Cone (in PC Type 1 format).
> Following Phillipp Lehman's excellent tutorial, I managed to get Small Caps,
> lining and text figures all working properly. No mean feat, as this is the
> first time I've done anything remotely like this.
> However, in order for the typeface to be even minimally useful, I really
> need to get ff, ffi & ffl ligatures working (fj would be nice, too, but that
> one is sitting on an Alternate font that I haven't touched yet).
> The fl and fi ligatures just work "out of the box."
> The ff, ffl & ffi ligatures are encoded on the OldStyle fonts as cedilla,
> hungarumlaut & ogonek, respectively.
> Now, I can access these glyphs using the \char command, but I would prefer
> to have TeX insert them automaticlaly.
> Following an example from your archives I tried the \reglyphfonts command,
> but this failed for me, as it did for the author of this post:
> http://www.tug.org/pipermail/fontinst/2005/001503.html

I typically use \reglyphfonts. How were you setting it up? I usually
have a separate file e.g. retlyph-galliard.tex:
which I then input after the initial reencoding but before the first
install command.

> A better path seemed to be writing a separate mtx file and using Alan
> Hoenig's \saveglyphas command, viz:
> %%%%%%%
> \relax
>    This is fgllig.mtx, to redefine glyphs in the ITC Galliard CC font.
> \metrics
> \setcommand\saveglyphas#1#2{%
>    % eg \saveglyphas{numbersign}{TT}
>    \setglyph{#2}
>        \glyph{#1}{1000}
>    \endsetglyph
>    \setleftkerning{#2}{#1}{1000}
>    \setrightkerning{#2}{#1}{1000}}
> \saveglyphas{cedilla}{ff}
> \saveglyphas{hungarumlaut}{ffi}
> \saveglyphas{ogonek}{ffl}
> \endmetrics
> %%%%%%%

I'm not sure. I think this will work provided there is no glyph named
e.g. 'ff' already in the font though I haven't done it this way. I
don't think it will work if there's already a glyph (mistakenly) called
'ff' though.

> In my naïveté, I would think this should suffice. Do I really need an new
> .etx as well, since T1.etx appears to already include the commands for
> dealing with these ligatures?

You shouldn't need a new .etx unless you want to include e.g. fj which
isn't covered by T1. Why do you think you do? That might provide an
alternative way of doing it, though I'm not sure, but you shouldn't
need a new .etx as well as the \reglyph/\setglyph commands.

> The relevant lines from my fontinst script are:
> %%%%%%%
> \input fontinst.sty
> \needsfontinstversion{1.926}
> \recordtransforms{fgl-OSF-rec.tex}
> \transformfont{fglr8r}{\reencodefont{8r}{\fromafm{fglr8a}}} %Roman
> \transformfont{fglri8r}{\reencodefont{8r}{\fromafm{fglri8a}}} %Italic
> \transformfont{fglrc8r}{\reencodefont{8r}{\fromafm{fglrc8a}}}    %SmallCaps
> \transformfont{fglrj8r}{\reencodefont{8r}{\fromafm{fglrj8a}}}    %OSF Roman
> \transformfont{fglrij8r}{\reencodefont{8r}{\fromafm{fglrij8a}}}    %OSF
> Italic
> [...] %skipping 13 lines that install my {fgl} family
> \installfonts
> \installfamily{T1}{fglj}{}
> \installfont{fglrj8t}{fglrj8r,newlatin,fgllig}{t1}{T1}{fglj}{m}{n}{} % i.e,
> fgllig.mtx
> \installfont{fglrcj8t}{fglrc8r,newlatin}{t1}{T1}{fglj}{m}{sc}{}
> \installfont{fglrij8t}{fglrij8r,newlatin,fgllig}{t1}{T1}{fglj}{m}{it}{} %
> \endinstallfonts
> \installfonts
> \installfamily{TS1}{fglj}{}
> \installfontas{fglr8c}{TS1}{fglj}{m}{n}{}
> \installfontas{fglr8c}{TS1}{fglj}{m}{sc}{}
> \installfontas{fglri8c}{TS1}{fgljd}{m}{it}{}
> \endinstallfonts
> \endrecordtransforms
> \bye
> %%%%%%%
> Am I doign this correctly? I'm afraid I really don't know how to proceed. Do
> I use OT1 enconding instead, as Alan Hoenig's examples do? Do I fork my own
> .etx and add the necessary commands by hand?
> A bonus would be not just getting these ligatures to work on {fglj} (since,
> as I mentioned, these glyphs are actually on fglrj8r), but to put them on
> {fgl} as well.

If the fgl fonts simply lack the glyphs, just add the appropriate call
to the fglj font on the install lines.

e.g. \installfont{fglr8t}{fglr8r,fglrj8r,fgllig,newlatin}... or
whatever. But you can't use this method if the fgl fonts themselves
contain glyphs called ogonek etc. The method using \reglyphfont is
probably simpler to use here. You can probably do it, but it may be
rather awkward.

- cfr

> Your help is much appreciated!
> - - christopher adams

More information about the fontinst mailing list