Locl features for Cyrillic

om's picture

I try to create locl feature for Serbian and Bulgarian letters. But while working in FontLab, they don’t work both in Illustrator and InDesign (CS4). My initial feature code:

feature locl { # Localized Forms
# Latin
language MOL exclude_dflt; # Moldavian
sub Scedilla by uni0218;
sub scedilla by uni0219;
language ROM exclude_dflt; # Romanian
sub Scedilla by uni0218;
sub scedilla by uni0219;
script cyrl; # Cyrillic
language BUL exclude_dflt; # Bulgarian
sub @russ by @bulg;
language SRB exclude_dflt; # Serbian
sub afii10066 by b.serb;
} locl;

It works for Moldavian and Romanian, but doesn’t work for Bulgarian and Serbian.
Then I used lookups:

feature locl { # Localized Forms
# Latin
lookup locl1 {
sub Scedilla by uni0218;
sub scedilla by uni0219;
} locl1;
lookup locl2 {
sub @russ by @bulg;
} locl2;
lookup locl3 {
sub afii10066 by b.serb;
} locl3;
language MOL; # Moldavian
language ROM; # Romanian
lookup locl1;
script cyrl; # Cyrillic
language BUL; # Bulgarian
lookup locl2;
language SRB; # Serbian
lookup locl3;
} locl;

In this case Cyrillic local features (Bulgarian and Serbian at the same time) works only if I change language to any “Latin” language. In “Cyrillic” languages locl features don’t work.

Any help would be appreciated.

Henyk's picture

I see that in CS3 and CS5 the same bug

---------------------------------------------------
"Quousque tandem abutere, Adobe, patientia nostri?"

Miguel Sousa's picture

Your code has several problems.
The language tag for Bulgarian is BGR, not BUL. See http://www.microsoft.com/typography/otspec/languagetags.htm
The languagesystem declarations are missing.
script latn; is also missing.

Here's the correct code (not tested)
languagesystem latn dflt;
languagesystem latn MOL;
languagesystem latn ROM;

languagesystem cyrl dflt;
languagesystem cyrl BGR;
languagesystem cyrl SRB;

feature locl {

script latn;
language MOL exclude_dflt;
sub Scedilla by uni0218;
sub scedilla by uni0219;

language ROM exclude_dflt;
sub Scedilla by uni0218;
sub scedilla by uni0219;

script cyrl;
language BGR exclude_dflt;
sub @russ by @bulg;

language SRB exclude_dflt;
sub afii10066 by b.serb;

} locl;

om's picture

Many thanks to you, Miguel!
It works!

Syndicate content Syndicate content