[luatex] Kern classes and lookups.
zappathustra
zappathustra at free.fr
Mon Feb 7 23:09:44 CET 2011
Hello there,
I'd be more than happy if anyone could answer some of the following
questions. I'm sorry, it might be a bit fastidious.
See the code extract below; it's from a font GPOS table. I've removed
some information, including the kerning tables themselves (i.e. firsts,
seconds, and offsets). Now what puzzles me is the organization. Lookup
pp_l_1_k_1 oversees with three kern classes, one associated with lookups
pp_l_1_k_1 (the same), pp_l_1_k_2 and pp_l_1_k_3, the second with
lookups pp_l_1_k_2 and pp_l_1_k_3, and the third with pp_l_1_k_3. Then
pp_l_1_k_2 has two kern classes, one associated with itself and
pp_l_1_k_3, and one with pp_l_1_k_3 only. Finally, pp_l_1_k_3 has one
class, associated with itself. I've found this "reverse pyramid" in
several font files. Besides, as far as I can tell, pp_l_1_k_1's second
class (meaning the kerning pairs) is identical to pp_l_1_k_2's first
(they're associated with the same lookups), and its third is equivalent
to pp_l_1_k_2's second and pp_l_1_k_3's only class. Well, all that seems
very logical, yet a bit redundant. Here are the questions:
1. What's the difference in status between a lookup in "name" and a
lookup in "lookup". Does it mean that if, say, pp_l_1_k_1 is obeyed,
pp_l_1_k_2 should be too? But why bother, since the classes in
pp_l_1_k_2 are already in pp_l_1_k_1?
2. Is it aimed at the general possibility that those lookups might be
fired separately, even though this is not the case in this font (they
appear only here and all depend on the "kern" feature)?
3. The user requests +kern. I use pp_l_1_k_1's classes, but what do I do
with the rest?
4. What's that pp_l_1_g_0 lookup doing anyway?
5. The information in the font's "kerns" table is identical to
pp_l_1_k_1's: three classes, one with the three lookups, the other with
2 and 3, the last with 3. Should I have relied on that in the first
place and just don't pay attention to GPOS tables when they're of the
"gpos_pair" type?
I'm sure I have other questions but let's leave it at that for the moment.
Thanks to anybody who bothered to read down to here,
Paul
%%% Extract from GPOS %%%
/2/type = gpos_pair
/2/name = pp_l_1
/2/features/1/tag = kern
/2/subtables/1/name = pp_l_1_g_0
/2/subtables/2/name = pp_l_1_k_1
/kernclass/1/lookup/1 = pp_l_1_k_1
/kernclass/1/lookup/2 = pp_l_1_k_2
/kernclass/1/lookup/3 = pp_l_1_k_3
/kernclass/2/lookup/1 = pp_l_1_k_2
/kernclass/2/lookup/2 = pp_l_1_k_3
/kernclass/3/lookup = pp_l_1_k_3
/2/subtables/3/name = pp_l_1_k_2
/kernclass/1/lookup/1 = pp_l_1_k_2
/kernclass/1/lookup/2 = pp_l_1_k_3
/kernclass/2/lookup = pp_l_1_k_3
/2/subtables/4/name = pp_l_1_k_3
/kernclass/1/lookup = pp_l_1_k_3
%%%%%%%%%%%%%%%%%
More information about the luatex
mailing list