[XeTeX] Vertical writing of CJK and fontspec (rawfeature=vertical) misbehaving

Will Robertson wspr81 at gmail.com
Sat Nov 28 14:58:43 CET 2009


On 2009-11-27 02:13:07 +1030, Michiel Kamermans 
<pomax at nihongoresources.com> said:

> An apology. After lots more websearching and discussion reading, I went 
> opentype tag hunting and came up with a combination that almost solves 
> the problem (using Vertical=RotatedGlyphs and 
> RawFeature=+fwid;+vrt2;+vkna;+vpal), but it's still not quite right - a 
> t least from what I can tell from my short Japanese example, the 
> character 日 is still malaligned (too far too the left rather than 
> centered  on top of 本).
> 
> It also leaves the fact that the "vertical" argument that can be passed 
> to fontspec should probably be called "rotated", instead. Unless it 
> internally also checks whether vertical tags are used, in which case it 
> might be checking for vert, but not vrt2 (which is apparently a 
> superset of vert).


I always meant to revisit the interface to vertical typesetting with 
fontspec. One problem I had was that no-one gave me any feedback about 
it -- people just used RawFeature=... instead to get the effects they 
wanted. Which is fine for the people who know what they're doing, but a 
more user-friendly wrapper in fontspec might have saved you a little 
time :) Unfortunately I never managed to investigate in sufficient 
detail to do that.

Anyway, here's the situation from the point of view of fontspec. When 
you say Vertical=RotatedGlyphs (not the best naming scheme in the 
world), you activate the equivalent of RawFeature={vertical,+vrt2}.

The "RawFeature=vertical" part is a plain XeTeX font feature that 
rotates the glyphs and boxes them so they're suitable for vertical 
typesetting (it's not "just" rotating the glyphs so the current name 
for that feature, I think, is fine). You need then the various 
combination of OpenType features to finish the job, so to speak. I 
would like fontspec to be more smart about using +vert instead of +vrt2 
, say, if the font uses the older OT feature, and incorporating the 
other necessary features you mention above. If you have suggestions for 
suitable behaviour here, please add them to the issue tracker in the 
GitHub repository (github.com/wspr/fontspec).

Meanwhile, none of this helps with your alignment problem :)  I'm 
afraid I can't help there; it's out of my current areas of expertise. 
It could well be a font and/or XeTeX issue; I would suggest trying with 
a range of fonts (if at all possible!) to try and pin this down.

Cheers,
Will




More information about the XeTeX mailing list