[XeTeX] Diacritics in color
aleksandr.andreev at gmail.com
Thu Dec 1 15:35:29 CET 2011
Matthew Skala writes:
> Demonstration attached.
Of course, the correct behavior in this case is that of Firefox: if I type:
I get the precomposed Korean glyph all in black. Why? Because in the
font (I don't have Jieubsida Dodum), the substitution rules tell us to
replace the individual components with a ligature. What happens here
in Firefox is what is supposed to happen -- the substitution rules are
still honored and the color is ignored.
If you want the ability to color individual Korean syllables (maybe
for some pedagogical reason), you would have to design a font that
does not use precomposed ligatures.
Again, we're talking about two separate issue here. The first is
coloring components of a precomposed ligature. Clearly, that is
impossible. As someone on this list already said, it's like having a T
where the top is red and the stem is black.
The other issue is coloring separate glyphs that are positioned
according to rules in GPOS. I don't think anywhere in the Unicode or
OpenType standards it says that this should not be possible. In fact,
it cannot say that in those standards because the standards don't
address color! Color is handled by the layout manager, not by Unicode
So the point then is that the software doing the layout (TeX, a
browser, OpenOffice, whatever) should be able to color the glyphs
while still honoring the positioning rules. Obviously, this would not
be possible for a script that relies heavily on precomposition (e.g.,
But I am willing to submit that this is a difficult task, and probably
one of limited importance -- I can see it being useful only for people
who for some reason need their Hebrew or Arabic vowels in color
(perhaps as a pedagogical tool) or for enthusiasts of Byzantine or
More information about the XeTeX