Wed 04 Jan 2012 11:42:44 PM UTC, comment #9:
Hi
On Wed, Jan 4, 2012 at 12:53 PM, Pander
>
> How is an adjusted alignment of combining diacritical marks stored? Is it
> depending:
> a) only in the glyph of the comb. diacr.
> b) on a combination of glyph of the comb. diacr. and the script
> c) on a combination of glyph of the comb. diacr. and the glyph it is
> actually combining with
> d) on a combination of glyph of the comb. diacr., the glyph it is actually
> combining with and the script
>
Combining diacriticals could be implemented several ways.
The most brain-dead way is for them to be zero-width non-advancing letters, which simply draw on top of the preceding character. This is adequate sometimes, but requires no features.
However if the geometry of the base mark varies, usually it is preferred to vary the position of the mark.
The GPOS table built for this is 'mark'. It works by matching an "anchor" on the mark with a counterpart on the base character. Each is positioned by hand, according to the shapes of the characters. This matches (d) in your list except the match of the feature to script and language is more flexible than that.
All the TrueType tables may be activated by script/language. This one is no different.
The marks I just added are activated by default for Cyrillic script.
But there are other ways to implement them involving GSUB tables etc. Can get messy.
> I assumed c) or d) and, what I have gathered now, it is a) or b). Hence the
> misunderstanding on my part. But I asked to really understand this better, not
> directly related to my book. With better understanding I can make better
> contributions.
>
> By the way, strange that in HTML it works directly without having to set the
> script to Cyrillic.
>
The way it is currently set up, it is activated by simply being in Cyrillic regardless of language. (As I explained before, the script can be detected by Unicode range; detecting the language isn't practical.)
Now that I think of it, I don't know why XeTeX doesn't do this. Maybe a feature request?
Further to my previous remark about setting language: it is a good idea, especially in web browsers, for multiple reasons, to mark up any changes of natural language (just one of which is to activate font features specific to that language).
Cheers!
|