Does anyone know how to get an automatic ligature into a font. I recently learned how to insert ligatures into the AFM file, but I don't know how to make the AFM usable.
Automatic ligature replacement is either a function of the software being used (that is, to recognize a specific sequence of characters and substitute the appropriate standard ligature), or a function programmed as a feature in an OpenType format font.
For a series of characters to be replaced by a ligature automatically, the font being used still needs to contain the ligature itself as a separate glyph. Inserting ligatures into the AFM file serves not purpose of the ligature itself does not exist as part of the character set in the font.
In this case, the ligatures (as glyphs) have already been drawn (The only one that is missing is the ff).
On many Adobe fonts, the ligature replacment seems to happen automaticaly (assuming my preferences are set correctly), but fonts from other foundries (ie Emigre or Storm) don't. I recently heard that by inserting code into the AFM file you can make ligature replacments happen, but my experiments have not yet yielded any results.
Maybe the question could have been different: "What is Adobe doing that no one else is?"
Hmm... I've never heard of a technique where modifying the AFM would assist mapping of ligatures to individual characters. I was under the impression that no current applications refer to the AFM file in any way whatsoever (except perhaps under Windows in order to produce a PFM file if one was missing).
I assume that Robert is speaking of Quark's automatic ligature function, which automatically replaces fi and fl ligatures only. Unfortunately, it only does this with fonts that are encoded with Adobe Standard Encoding. Emigre, Storm, Font Bureau, Hoefler, and others do not always generate with Adobe Standard Encoding.
The AFM trick doesn't do any good on the Mac platform. I saw that documented in the Type 1 spec, but never got it to work either. I think it may only apply to Windows systems. (Note that the fi and fl ligatures themselves are not available from the Windows keyboard.)
The irony here is that fonts which have been made with the extra ff ligatures in some of the less frequently used character slots (which is why they don't use Adobe encoding) don't get the basic fi and fl ligs substituted, so it all has to be done manually.
This is undoubtedly due to the Quark implementation of its substitution algorithm. Presumably is assumes that if a font isn't encoded with Adobe Standard Encoding, then it might not be an alphabetic font, and so it doesn't do any f-lig substitution.
There is actually a workaround for this, which Cherie Cone applies to Carter & Cone fonts. It involves modifying a resource in the suitcase. She uses a proprietary utility (that only works on old Mac OSes, I think). I have info here somewhere, but I don't remember the details offhand. If I get a chance, I'll look it up.
On the flip side, Thomas Phinney tells me that InDesign will automatically replace not only the fi and fl ligs from a regular PS Type 1 font, but also ff-ligs, if they are present and named in a certain way. The downside is that they aren't actually encoded, so there can't be any kern pairs for them.
Yes, it's OK (I tried to post this in the build section and couldn't figure out how).
You've hit the nail on the head Kent; thanks for all the information! If you do find the information on the Carter & Cone workaround, I would be very interested to see it.
> The AFM trick doesn't do any good on the Mac platform. > I saw that documented in the Type 1 spec, but never got it > to work either. I think it may only apply to Windows systems.
Well, I'll be blasted. Thanks for the elucidation, Kent.
As for the Carter & Cone method of modification of the suitcase data, this should work under Mac OS X, providing the format of the suitcase data (the glyph mapping tables, I am assuming) has not changed. I wonder if their utility runs in Classic?
Good point. Although it could be ResEdit employing a customized editor template, which would facilitate modification of the font data. The default FOND and NFNT resource templates in ResEdit are sadly lacking in depth.
I'm not sure what the purpose of the "AFM trick" ever was. Maybe it was used by TeX? I don't think it does anything for any mainstream Windows applications.
As for ff-ligs in indesign, you can make them work for regular Type 1 fonts just by naming the glyphs ff, ffi and ffl. You can leave the glyphs unencoded.
ResEdit is a resource editor developed Apple Computer. Resources contain bits of code and data related various attributes of a Macintosh-Based file or application. By modifying these resources with a utility such as ResEdit, you can change the behaviour, appearance or contents of the file or application your are editing.
It's not ResEdit. It's a little application called FondModifier. It appears to have been written for them by some "very bright fellow" (Cherie's words) who used to work with them at Bitstream.
I suppose you could make the modifications with ResEdit if you knew how to read the hexadecimal.
Basically the change is to add back PS glyph name 222: fi and PS glyph name 223 : fl.
Using Apple's DumpFOND tool, I checked a C&C font and it shows:
/* GLYPH REENCODING TABLE */
Name for character code 0xDE: 'fi' Name for character code 0xDF: 'fl'
Maybe you could use Apple's FuseFOND to make this change to the FOND. I think I tried it once and couldn't get it to work.
I don't understand how or why this modification works. The fi and fl glyphs should be encoded to Dec 222 and 223 in the encoding array of the PS font. I don't know why a "reencoding table" is needed in the FOND.
"BTW, does ResEdit work in X? If not, is there an equivalent for X?"
I'm not sure about the font environment, but most resources in OS X are much more accessible. The Finder contextual menu of any application icon offers "Show Package Contents" which reveals that app's editable resources directly in the Finder view.
23 Feb 2004 — 7:13am
Automatic ligature replacement is either a function of the software being used (that is, to recognize a specific sequence of characters and substitute the appropriate standard ligature), or a function programmed as a feature in an OpenType format font.
For a series of characters to be replaced by a ligature automatically, the font being used still needs to contain the ligature itself as a separate glyph. Inserting ligatures into the AFM file serves not purpose of the ligature itself does not exist as part of the character set in the font.
23 Feb 2004 — 7:27am
In this case, the ligatures (as glyphs) have already been drawn (The only one that is missing is the ff).
On many Adobe fonts, the ligature replacment seems to happen automaticaly (assuming my preferences are set correctly), but fonts from other foundries (ie Emigre or Storm) don't. I recently heard that by inserting code into the AFM file you can make ligature replacments happen, but my experiments have not yet yielded any results.
Maybe the question could have been different: "What is Adobe doing that no one else is?"
23 Feb 2004 — 7:33am
Hmm... I've never heard of a technique where modifying the AFM would assist mapping of ligatures to individual characters. I was under the impression that no current applications refer to the AFM file in any way whatsoever (except perhaps under Windows in order to produce a PFM file if one was missing).
23 Feb 2004 — 7:53am
I assume that Robert is speaking of Quark's automatic ligature function, which automatically replaces fi and fl ligatures only. Unfortunately, it only does this with fonts that are encoded with Adobe Standard Encoding. Emigre, Storm, Font Bureau, Hoefler, and others do not always generate with Adobe Standard Encoding.
The AFM trick doesn't do any good on the Mac platform. I saw that documented in the Type 1 spec, but never got it to work either. I think it may only apply to Windows systems. (Note that the fi and fl ligatures themselves are not available from the Windows keyboard.)
The irony here is that fonts which have been made with the extra ff ligatures in some of the less frequently used character slots (which is why they don't use Adobe encoding) don't get the basic fi and fl ligs substituted, so it all has to be done manually.
This is undoubtedly due to the Quark implementation of its substitution algorithm. Presumably is assumes that if a font isn't encoded with Adobe Standard Encoding, then it might not be an alphabetic font, and so it doesn't do any f-lig substitution.
There is actually a workaround for this, which Cherie Cone applies to Carter & Cone fonts. It involves modifying a resource in the suitcase. She uses a proprietary utility (that only works on old Mac OSes, I think). I have info here somewhere, but I don't remember the details offhand. If I get a chance, I'll look it up.
On the flip side, Thomas Phinney tells me that InDesign will automatically replace not only the fi and fl ligs from a regular PS Type 1 font, but also ff-ligs, if they are present and named in a certain way. The downside is that they aren't actually encoded, so there can't be any kern pairs for them.
-- K.
23 Feb 2004 — 9:27am
Yes, it's OK (I tried to post this in the build section and couldn't figure out how).
You've hit the nail on the head Kent; thanks for all the information! If you do find the information on the Carter & Cone workaround, I would be very interested to see it.
23 Feb 2004 — 11:00am
> The AFM trick doesn't do any good on the Mac platform.
> I saw that documented in the Type 1 spec, but never got it
> to work either. I think it may only apply to Windows systems.
Well, I'll be blasted. Thanks for the elucidation, Kent.
As for the Carter & Cone method of modification of the suitcase data, this should work under Mac OS X, providing the format of the suitcase data (the glyph mapping tables, I am assuming) has not changed. I wonder if their utility runs in Classic?
23 Feb 2004 — 11:06am
I have a feeling it's just ResEdit.
BTW, is Cherie Cone responsible for some technical aspects of type production?
hhp
23 Feb 2004 — 11:56am
> I have a feeling it's just ResEdit.
Good point. Although it could be ResEdit employing a customized editor template, which would facilitate modification of the font data. The default FOND and NFNT resource templates in ResEdit are sadly lacking in depth.
23 Feb 2004 — 12:13pm
But don't you just love its keyboard creation part? Wonderful.
BTW, does ResEdit work in X? If not, is there an equivalent for X?
hhp
23 Feb 2004 — 12:24pm
I am about to reveal my ignorance but....
What does ResEdit do? and what is a resource fork?
(Maybe I should be posting such questions on a Macintosh utility site.)
23 Feb 2004 — 1:34pm
I'm not sure what the purpose of the "AFM trick" ever was. Maybe it was used by TeX? I don't think it does anything for any mainstream Windows applications.
As for ff-ligs in indesign, you can make them work for regular Type 1 fonts just by naming the glyphs ff, ffi and ffl. You can leave the glyphs unencoded.
T
23 Feb 2004 — 4:19pm
> What does ResEdit do?
ResEdit is a resource editor developed Apple Computer. Resources contain bits of code and data related various attributes of a Macintosh-Based file or application. By modifying these resources with a utility such as ResEdit, you can change the behaviour, appearance or contents of the file or application your are editing.
ResEdit does indeed work under Classic in OS X.
23 Feb 2004 — 5:20pm
It's not ResEdit. It's a little application called FondModifier. It appears to have been written for them by some "very bright fellow" (Cherie's words) who used to work with them at Bitstream.
I suppose you could make the modifications with ResEdit if you knew how to read the hexadecimal.
Basically the change is to add back PS glyph name 222: fi and PS glyph name 223 : fl.
Using Apple's DumpFOND tool, I checked a C&C font and it shows:
/* GLYPH REENCODING TABLE */
Name for character code 0xDE: 'fi'
Name for character code 0xDF: 'fl'
Maybe you could use Apple's FuseFOND to make this change to the FOND. I think I tried it once and couldn't get it to work.
I don't understand how or why this modification works. The fi and fl glyphs should be encoded to Dec 222 and 223 in the encoding array of the PS font. I don't know why a "reencoding table" is needed in the FOND.
But that's how it works.
-- K.
23 Feb 2004 — 9:14am
Hope it was okay that I moved this to the "BUILD" area.
23 Feb 2004 — 1:42pm
"BTW, does ResEdit work in X? If not, is there an equivalent for X?"
I'm not sure about the font environment, but most resources in
OS X are much more accessible. The Finder contextual menu of
any application icon offers "Show Package Contents" which
reveals that app's editable resources directly in the Finder view.