OT features for accented characters

moyogo's picture

I'm working on fonts that should support a maximum of accented characters (precomposed and composed). What's the best way to use OpenType features to avoid making smallcaps, etc. of every accented character (if that's possible)?

Can 'ccmp' and 'liga' be applied together on each precomposed character to get composed variants when applying features such as 'c2sc', 'smcp', etc.?
How do font renderers handle 'ccmp' and 'liga' when together?

The test program (TrueTypeViewer) shows the desired behaviour. For example  (Acircumflex, ccmp: A + uni0302, liga: A + uni0302) is always rendered as  (circumflex) when the default 'ccmp' and 'liga' for latn are enabled. When applying 'c2sc' the desired composed smallcap  (A.small + uni0302) is displayed.

Would this work on most systems? Do some display the precomposed forms instead of the composed ones when not advanced feature is applied?
How do you deal with advanced features for tons of precomposed characters?

twardoch's picture

> Can ‘ccmp’ and ‘liga’ be applied together

Any features can be applied together. In such case, the order of the lookups in the font decides which substitutions or positionings are applied first.

But what do you want to put into the liga feature? A + uni0302 is not really a substitution that should be placed in the liga feature because Acircumflex is not a ligature. If you intend to hack the OpenType spec, of course you can still do it but keep in mind that your font will considered a hack.

> Do some display the precomposed forms instead of
> the composed ones when not advanced feature is applied?

Yes, some applications apply the Unicode canonical composition process on the text string level, i.e. before the OpenType Layout processing is triggered. Some applications may also perform canonical reordering.

Also keep in mind that "ccmp" can be realized through substitutions but you can also add "mark" and "mkmk" features that position diacritical marks through GPOS. Your "ccmp" will be supported in a larger percentage of applications, e.g. TextEdit on Mac OS X 10.4 or InDesign non-Middle East while "mark" will be supported only in savvy applications e.g. Notepad on Windows XP SP-2, Word or InDesign Middle East.

A.

moyogo's picture

Thanks Adam.

> But what do you want to put into the liga feature? A + uni0302 is
> not really a substitution that should be placed in the liga feature
> because Acircumflex is not a ligature. If you intend to hack the
> OpenType spec, of course you can still do it but keep in mind that
> your font will considered a hack.

I guess I'll just have 'ccmp' for these since some apps won't do the canonical composition.

> Also keep in mind that “ccmp” can be realized through substitutions
> but you can also add “mark” and “mkmk” features that position
> diacritical marks through GPOS.

What would be the point of combining diacritics if there's no anchors to place them ;-) (too bad many fonts with combining diacritics don't have them).

moyogo's picture

Thanks for the links Miguel.

twardoch's picture

> What would be the point of combining diacritics
> if there’s no anchors to place them

You can have combining diacritics without mark/mkmk but surely it's much better to include these features (that use anchors, obviously).

A.

Syndicate content Syndicate content