Typophile

Question on localisation features for small caps

Ramiro Espinoza

Hi there,

When you make localisation features (locl) for substitutions such:

language TRK;
# Turkish
sub i by i.latn_TRK;

is it necessary also to address its small caps counterpart? ( sub i.sc by i.latn_TRK.sc; )
or this is not really needed since i.latn_TRK will be made i.latn_TRK.sc by the 'smcp' feature?

Thanks in advance.

Ramiro.

Unless your localization feature applies after your small caps feature (which would defeat the whole purpose) then there should be no need.

The normal substitutions needed would be:

feature locl {
  script latn;
  language TRK exclude_dflt;
    sub i by i.trk;
} locl;

feature smcp {

  sub i by i.sc;
  # if using separate glyphs for smcp/c2sc
    sub dotlessi by dotlessi.sc;
    sub i.trk by i.trk.sc;
  # if using the same glyphs for smcp/c2sc
    sub dotlessi by I.sc
    sub i.trk by Idotaccent.sc
} smcp;

André

Hi Ramiro
As far as I know, in your code you for localized forms you only need
lookup locl_TRK {
sub i by i.TRK;
} locl_TRK;

In your small caps feature you should substitute both i and i.TRK
smcp {
sub i by i.smcp;
sub i.TRK by i.TRK.smcp;
} smcp;

Be sure to put the locl feature above smcp, so when you activate locl for TRK, i will be substituted by i.TRK and then when you activate smcp the i.TRK will be subsituted by i.TRK.smcp, on the other hand if locl for TRK is deactivated and you activate smcp, i will be substituted by i.smcp

There are other ways of doing this. I hope this works.
You also can read this comment by Twardoch http://typophile.com/node/17787

Regards

"locl" should indeed be included before other features in the font. Then, you can just make plain substitutions of the localized glyphs (since they've been swapped in the locl feature) using the regular "latn/dflt" context (which is available if you don't use the explicit language statement). Of course you do need to make sure that in smcp, you're replacing i.latn_TRK with a *dotted* small-cap i, while the regular i should be replaced with an undotted smallcap i. That is, actually, the very purpose of employing the locl feature: i and i.latn_TRK look identical as they are, but the "locl" swap allows you to use two different input glyphs when performing OpenType replacements that are functionally case substitutions (smcp, pcap, titl, case etc.).

A.

Captured from web.archive.org on 27 Dec 2010. view this capture