Using old fonts Around 2000 I acquired a collection of fonts, mostly Type 1 and some TrueType. As it appears they are not fully usable in ConTeXt. The two main issues are: 1. Kerning and ligatures These features can be only be used, if the GPOS and GSUB tables are present and adequately filled. Now, the old font files do not have these tables, but instead use some obsolete (?) form of kerning table, and ligatures are not qualified as such, but only trough their Unicode point and name (most commonly fi and fl). I used fontforge, which creates the GPOS table automatically, added the liga table manually, and generated an OTF font file. Is there a way to automate this (possibly a fontforge script)? The script should also find the ligatures (there may also be frac substitutions). Or is there another way which leaves the files unchanged? 2. Selecting glyphs from multiple font files Often there are additional font files which contain small caps (in place of lowercase characters) and old style figures (in place of digits), and other variant glyphs and additional ligatures (usually the font name contains OsF, SC, Alt, or Exp). Sometimes these are not allocated to a Unicode point, but only identified by name (e.g. "threeoldstyle" or "Esmall"). Is it possible to create some sort of virtual feature (such as onum), that will cause ConTeXt to take glyphs from another file (but only for specified Unicode ranges)? I suppose this can be done with a Lua goody.
On 11/18/2021 5:36 PM, Gérard Milmeister via ntg-context wrote:
Using old fonts
Around 2000 I acquired a collection of fonts, mostly Type 1 and some TrueType. As it appears they are not fully usable in ConTeXt. The two main issues are:
1. Kerning and ligatures
These features can be only be used, if the GPOS and GSUB tables are present and adequately filled. Now, the old font files do not have these tables, but instead use some obsolete (?) form of kerning table, and ligatures are not qualified as such, but only trough their Unicode point and name (most commonly fi and fl). I used fontforge, which creates the GPOS table automatically, added the liga table manually, and generated an OTF font file.
Is there a way to automate this (possibly a fontforge script)? The script should also find the ligatures (there may also be frac substitutions). Or is there another way which leaves the files unchanged?
Are you talking type 1 fonts? These should just work, assuming that you have the afm files installed. You need to define them with the right features enabled (just like opentype fonts).
2. Selecting glyphs from multiple font files
Often there are additional font files which contain small caps (in place of lowercase characters) and old style figures (in place of digits), and other variant glyphs and additional ligatures (usually the font name contains OsF, SC, Alt, or Exp). Sometimes these are not allocated to a Unicode point, but only identified by name (e.g. "threeoldstyle" or "Esmall"). Is it possible to create some sort of virtual feature (such as onum), that will cause ConTeXt to take glyphs from another file (but only for specified Unicode ranges)? I suppose this can be done with a Lua goody. The fallback mechanism does that (you can define a collection that way). One can also try to make features (there are examples in the te st suite).
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On Thu, 2021-11-18 at 18:57 +0100, Hans Hagen wrote:
Are you talking type 1 fonts? These should just work, assuming that you have the afm files installed. You need to define them with the right features enabled (just like opentype fonts). Ok, yes this works (for kerning and the standard ligatures). liga=no, however does not disable ligatures. I had slight practical problem with Type 1 fonts, in that the OSFONTDIR variables needs to be set while running context. For TTF and OTF this appears only to be needed while refreshing the cache. Since I am not yet familiar with typescript I use \definefontfamily. Here I needed to set
\definefontfamily[mainfont][serif][Bembo][tf=Bembo,...] instead of just \definefontfamily[mainfont][serif][Bembo]. Are there any other features than apply to Type 1 fonts?
The fallback mechanism does that (you can define a collection that way). One can also try to make features (there are examples in the te st suite). Have you got any pointer to such an example?
participants (2)
-
Gérard Milmeister
-
Hans Hagen