Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Components of Compund Glyphs in OpenType/TrueType

I cannot find any information in the specification for the OpenType/TrueType glyf table that clarifies if the components of a compound glyph are always simple glyphs, or if they can be compound glyphs themselves (i.e. recursive compound glyphs).

Since the specification does not explicitly prohibit compound glyphs as components, I would assume that it is possible in theory. But my question is: Are there any fonts that actually contain recursive compound glyphs? And do any of the major font tools support this?

The background is that I am writing a simple font parser and I want to know if I need to be aware of recursive compound glyphs, because this would make the algorithms a bit more complicated.

Update: I found some information in the spec for the maxp table. This defines maxComponentDepth, which is the maximum level of recursions for compound glyphs. This shows me that recursive compound glyphs are possible. But are they actually being used?

like image 545
Waruyama Avatar asked Mar 10 '17 22:03

Waruyama


1 Answers

I found that in the standard Arial font there are four compound glyphs that have another compound glyph as a component. One example is the glyph at index 471, which is used for unicode U+01FB (latin small letter a with ring above and acute). It consists of the Acute glyph, which is a simple glyph, and the small latin a with ring above, which is a compound glyph.

Composition of glyph 471 in TrueType font Arial:

composition of glyph 471

So the conclusions from this are:

  1. Recursivly compound glyphs are possible in TrueType/OpenType fonts.
  2. These glyphs exist in common fonts.
like image 80
Waruyama Avatar answered Sep 30 '22 08:09

Waruyama