ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Using old fonts
@ 2021-11-18 16:36 Gérard Milmeister via ntg-context
  2021-11-18 17:57 ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Gérard Milmeister via ntg-context @ 2021-11-18 16:36 UTC (permalink / raw)
  To: ntg-context; +Cc: Gérard Milmeister

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.


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using old fonts
  2021-11-18 16:36 Using old fonts Gérard Milmeister via ntg-context
@ 2021-11-18 17:57 ` Hans Hagen via ntg-context
  2021-11-18 18:50   ` Gérard Milmeister via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen via ntg-context @ 2021-11-18 17:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using old fonts
  2021-11-18 17:57 ` Hans Hagen via ntg-context
@ 2021-11-18 18:50   ` Gérard Milmeister via ntg-context
  0 siblings, 0 replies; 3+ messages in thread
From: Gérard Milmeister via ntg-context @ 2021-11-18 18:50 UTC (permalink / raw)
  To: Hans Hagen, mailing list for ConTeXt users; +Cc: Gérard Milmeister

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?

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-18 18:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 16:36 Using old fonts Gérard Milmeister via ntg-context
2021-11-18 17:57 ` Hans Hagen via ntg-context
2021-11-18 18:50   ` Gérard Milmeister via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).