[XeTeX] XeTeXuseglyphmetrics

Ulrike Fischer news3 at nililand.de
Wed May 27 10:47:28 CEST 2009


Am Wed, 27 May 2009 16:05:26 +0800 schrieb Yue Wang:


>>> For the font primitive \XeTeXuseglyphmetrics, it is explained in
>>> XeTeX-reference.pdf that

>>>> Counter to specify if the height and depth of characters are
>>>> taken into account while typesetting (≥ 1). Otherwise (< 1), a
>>>> single height and depth for the entire alphabet is used.

>>> Is it possible for this primitive to take the real width of
>>> characters into account? If yes, it would be helpful to set
>>> margin kerning (and much more) for Chinese punctuation
>>> characters.

>> I don't understand the question. The width of a char is always
>> taking into accout during typesetting. "iii" has another width than
>> "mmm" for a proportional font. But in general it is not really
>> needed to check for each char if it is touching a chars on another
>> line.

> But in CJK font this is different, every font can be treat as "mono".
> However for professional typesetting, we should compress the
> punctuation mark (which is still 1em in width).
> Different fonts have different styles/positions of punctuation marks.
> It is important to get the actual position (bounding box) of
> punctuation marks in order to calculate (not estimate, we can only
> estimate now....) the exact compressing width.

I don't think that \XeTeXuseglyphmetrics is useful in this context.
It only tells xetex to *use* the existing informations about height
and depth (the bounding box), it doesn't generate or change them. 

I don't know anything about CJK so I can't offer a solution only
some ideas:
- change the font itself
- Look if \XeTeXinterchartoks can be used
- Use commands for the punctuation marks (e.g. by activating the
chars) and then define them as you want (this can probably be done
on a font level).



-- 
Ulrike Fischer 



More information about the XeTeX mailing list