[XeTeX] rotating glyphs (still trying to make xetex/fontspec do what I want it to)
Michiel Kamermans
pomax at nihongoresources.com
Wed Dec 16 12:48:25 CET 2009
Hi all,
I'm still trying to make xetex/fontspec typeset vertical Japanese
properly, for fonts that typeset properly in applications such as adobe
photoshop or openoffice writer, but don't set properly in XeTeX with
fontspec - where would I look to find out how xetex computes glyph
position for rotated glyphs? When I apply fontspec for several fonts
without any arguments, for instance, the glyph positioning looks fine,
but when I issue a \fontspec[RawFeature=vertical]{fontname} or
\fontspec[Vertical=RotatedGlyph]{fontname}, glyphs can become rather
awkwardly positioned. For some fonts almost imperceivably, for others it
screws up very badly, with glyphs overlapping and having wildly
different h/v origins, and losing their monospaced look. If I add the
opentype tags +fwid and/or +vpal to ensure monospacing, this problem
doesn't go away.
I'm a bit puzzled why WYSIWYG editors would get this right, while a
typesetting language does not. Consider this not so much a complaint but
a plea: how the hell do I fix this? There's plenty of vertical
typesetting to be done in the world, and the only thing that needs to be
done to a font to get this working properly is glyph rotation and new
h/v origin computation. And that last step seems to go horribly wrong
for *quite* a number of Japanese fonts I'm trying this with.
What is particularly irking is that MS Word, OO Writer, and other
WYSIWYG applications don't seem too bothered by the fact that some of
these fonts, as far as the microsoft Font Properties Extension reveals,
don't come with any opentype tags at all. They simply typeset the text
vertically, and correctly positioned.
Does anyone who reads this list have any idea where to start looking in
order to figure out how XeTeX deals with rotating characters, how it
enables and disables opentype features, and how it (re)computes
horizontal and vertical origins? I suck at C and C++, but this is
maddening enough to want to just look at the code and figure out how to
make it work. It's a tarnish on TeX's power that it can't do what should
(for the user) be a simple trick, and one I'd love to remove from the
list of "yes, TeX is great at typesetting, as long as you avoid trying
to ..." entries for people who consider moving away from their word
processor application. At its most basic funcational level, all that's
required is a rotation within an em box. To quote Top Gear: "how hard
can it be?"
- Mike "Pomax" Kamermans
nihongoresources.com
More information about the XeTeX
mailing list