Hello,
Shouldn't the subtype be "2"? In setion 7.1.2.12, bit 1 is used to denote a glyph, if I understand the manual correctly. Since I convert the character to a glyph in the font, this bit should be set afterwards.
I am somewhat in doubt about that. The manual and my coding practise do not quite agree on what the value really should be, but bit zero should definately be cleared (in fact, that is the only test made, right now).
Mmm ... if the subtype is a bitfield, IMO one bit should be set; otherwise the subtype would be undefined. Still, why is the subtype ia bitfield anyway? Can a glyph node i.e. be both a character node as well as a ligature node?
[...]
Anyway, now I have a place where to start. Still, I am a bit clueless on how to create an accented character node. Or do I have to insert another character node in the list containing the accent (i.e. '"' to create an 'รค' from an 'a')?
A virtual font would be easier, but: yes, you can do it that way.
Let me see if I get this right: 1. I load the font, i.e. in OT1-encoding, just like any other TeX font. 2. I modify the font's table (i.e. by using the "define_font" callback): I add all characters I want to support to the font's "characters" array. Each of these new characters contains a "commands" field which constructs the character from several others in the font. 3. I use the (artificial, as described in section 6.2.1) font and am a happy clam. Questions: - Section 6 of the manual states that the key of the "characters" table is the "internal code TeX knows this character by". How do I determine this code? Is this simply the Unicode code point? - If I handle accented characters this way, I do not have to create a "ligaturing" callback, do I? - Does the "char" font command move the output pointer?
How do I tell this new node to overlap the 'a'?
By adding some extra kerning around it, and/or tweaking the values of the "xoffset" and "yoffset" fields (the need for such node list manipulations is the main reason why a virtual font is easier).
It seems like it, especially since I would need some kind of data structure to describe the character-replacements anyway. Also, a virtual font would most likely be easier on the garbage collector.
Best wishes, Taco
Jonathan