DaveyD wrote:1. Regarding lookup function, what I mean to ask is can the lookups (or better said, the pos commands) be inserted directly into the feature function, or does it have to be in a lookup function? I.e., is the lookup function for "organizational" purposes, or is this essential to the functionality?
It is essential to put them in lookups.
DaveyD wrote:2. Similarly, regarding the subTable - do the pos commands have to be in the subtable, or can they be in the lookup function itself
They can be in the lookup, but only if you don't need more than one table; FontCreator will then take care of the correct internal OpenType Layout Feature data.
DaveyD wrote:3. If it doesn't have to be in a subTable, so what are subTables used for?
You can for example use the first subtable to define several exceptions:
pos T edieresis <-10>;
Then use another sub table to make more easy to maintain (and usually class based) kerning like
class @T [T Tcedilla Tcaron Tbar];
class @e [e egrave eacute ecircumflex edieresis ebreve edotaccent ecaron];
pos @T @e <-20>;
in this example the pair T edieresis will have a kerning value -10
The others will use -20
DaveyD wrote:4. Can you explain - or show an example of what a contextual substitution is?
Yes. See:
DaveyD wrote:Is it possible to use a longer pos command? I.e., I want to change character A and B only when they appear in succession with C and D.
E.g. whenever the letters ABCD are in succession, change kerning of D - but nothing else should change
This should get you started:
Code: Select all
script DFLT {
feature Kerning;
}
class @KernClassT [T];
class @KernClassedieresis [edieresis];
class @KernClass1 [T Tcedilla Tcaron Tbar];
class @KernClass2 [e egrave eacute ecircumflex edieresis ebreve edotaccent ecaron];
class @KernClassC [C];
class @KernClassD [D];
feature Kerning kern {
lookup ChainedContextPositioning1;
lookup PairAdjustment1;
}
lookup ChainedContextPositioning1 {
context (B A) C (D E);
sub 0 PairAdjustment2;
}
lookup PairAdjustment1 {
subtable "Subtable 1" {
pos @KernClassT @KernClassedieresis <-10> <0>;
}
subtable "Subtable 2" {
pos @KernClass1 @KernClass2 <-20> <0>;
}
}
lookup PairAdjustment2 {
pos @KernClassC @KernClassD <-700> <0>;
}
Note: In context (B A) C (D E); the A and B are switched for some reason. I think this is a flaw on our side, so I'll look into it!