[XeTeX] STFangsong punctuation kerning

Jonathan Kew jonathan_kew at sil.org
Mon Jun 12 11:10:33 CEST 2006

On 12 Jun 2006, at 6:20 am, Will Robertson wrote:

> On 12/06/2006, at 4:57 , Likai Liu wrote:
>> However, if two full-width punctuation marks appear right next to
>> each other, which
>> often happens in a sentence with quotation marks or parentheses,  
>> there
>> is a lot of redundant space. The solution is to "merge" two
>> punctuation
>> marks into one block.
> Hi,
> Are the merged punctuation marks available as separate characters?
> I suspect not, in which case, your current method seems to be the
> only way to go about it at present. Some Asian fonts have half-width
> characters, but you'd still need a way to active the feature in this
> case. Ideally, the font would be clever enough to do this for you.

I was going to suggest that the neatest way to do this substitution  
would be using a font mapping, which could replace pairs of adjacent  
fullwidth punctuation with their halfwidth equivalents. However, on  
looking at what's actually defined in Unicode, I don't think the  
collection of halfwidth characters is rich enough for this to help  
much; there are halfwidth variants of (ideographic) comma and full  
stop, but not most other punctuation. So this would be a simple  
implementation but wouldn't achieve very much!

An AAT or OpenType font could provide this as a contextual feature,  
substituting alternate glyphs in pair contexts, but I haven't seen  
any font that actually implements this. (Consider a feature request  
to Asian font vendors?)

Some people have asked for a way to specify additional automatic  
kerning in xetex, to supplement what is built in to the AAT/OT fonts,  
but there is no such mechanism at present. And I suspect that it  
would not really be adequate for this situation, as you'll usually  
need to adjust *both* sidebearings of the punctuation glyphs to get a  
good result, not only kern between the pair. A standard kern  
operation won't do this; you'd need a more complex contextual  
positioning rule.

So I guess you're left with setting up active characters in xetex,  
and making them look ahead and adjust their spacing as appropriate.  
How best to program this in tex macros is a question for the macro  


More information about the XeTeX mailing list