script tag

Indices : Technical Info : Script Tag

http://www.microsoft.com/OpenType/OTSpec/scripttags.htm

Discussion:
What is the proper Eng shape?
AFDKO 2.0: Post your feedback here
OpenType features take a vacation with one font using FL5 Mac

Indices : OpenType How-To : Script Tags

In the lower-right part of the OpenType panel, declare *all* the languagesystems that your OT code uses.

You should at any case declare these two:

languagesystem DFLT dflt;
languagesystem latn dflt;

Then, you should declare all the languages that use the Latin script for which you have some special handling. For the Scedilla->Scommaaccent “locl” behavior, declare Moldavian (MOL) and Romanian (ROM). For the special “i” casing and ligature treatment, declare Azeri (AZE), Crimean Tatar (CRT) and Turkish (TRK, *not* TUR!):

languagesystem latn AZE;
languagesystem latn CRT;
languagesystem latn MOL;
languagesystem latn ROM;
languagesystem latn TRK;

If your font includes any Cyrillic glyphs, you should also declare the Cyrillic script:

languagesystem cyrl dflt;

If you want to include special Serbian glyphs in locl, declare Serbian as well:

languagesystem cyrl SRB;

If your font includes any Greek language glyphs (i.e. not mathematical Greek), you should also declare the Greek script:

languagesystem grek dflt;

So your lower-right part of the OpenType panel may look like this:

languagesystem DFLT dflt;
languagesystem latn dflt;
languagesystem latn AZE;
languagesystem latn CRT;
languagesystem latn MOL;
languagesystem latn ROM;
languagesystem latn TRK;
languagesystem cyrl dflt;
languagesystem cyrl SRB;
languagesystem grek dflt;

This provides a map for all the languagesystems that will be included in your font. If a feature definition does not use any exceptions, it will be automatically assigned to all the languagesystems defined there.

If a feature definition defines any exceptional handling for any of the languagesystems, you must enumerate all of these languagesystems once again, inside of the feature definition, and you must specify for each of them the appropriate action (i.e. “exclude_dflt” or “include_dflt” plus some lookups if necessary).

As for “smcp”, “c2sc” and “liga” handling of Turkish “i”, I recommend using the new Adobe approach. That is,

feature locl { # Localized Forms
script latn;
# Handling of Turkish i
language TRK exclude_dflt;
lookup locl_TRK {
sub [i I.smcp] by [i.TRK Idotaccent.smcp];
# The “i.TRK” glyph should be an identical copy of “i”
} locl_TRK;
language AZE exclude_dflt;
lookup locl_TRK;
language CRT exclude_dflt;
lookup locl_TRK;
# Handling of Romanian Scommaaccent
language ROM exclude_dflt;
lookup locl_ROM {
sub [Scedilla scedilla] by [Scommaaccent scommaaccent];
sub Scedilla.smcp by Scommaaccent.smcp;
} locl_ROM;
language MOL exclude_dflt;
lookup locl_ROM;
} locl;

(You may also want to include the Serbian glyph handling there).

This way, you will avoid the need to deal with “script” and “language” in ANY other OpenType feature definition.

Simply make sure that in the feature definition of “smcp” (or in the appropriate classes), “i” gets replaced by “I.smcp” and “i.TRK” by “Idotaccent.smcp”. Of course “dotlessi” should be replaced by “I.smcp” as well.

Written by Adam Twardoch in OpenType Features Take a Vacation...

Syndicate content