[luatex] CJK vertical typesetting
Dohyun Kim
nomosnomos at gmail.com
Wed Jul 20 08:43:12 CEST 2011
2011/7/19 Hartmut Henkel <hartmut_henkel at gmx.de>:
>> The problem seems to occur because of the strange behavior
>> of boxes under RTT dir. Take a look at the following code;
>> is this intended behavior?
>>
>> \pagedir RTT \bodydir RTT
>> \offinterlineskip
>> \setbox0=\hbox{} \ht0=5pt \dp0=5pt
>> \setbox2=\vbox{\copy0\box0}
>> \showthe\ht2 \showthe\dp2 % prints 15pt, 5pt (ok)
>> \setbox4=\hbox{\box2}
>> \showthe\ht4 \showthe\dp4 % prints 10pt, 10pt (??)
>> \bye
>
> it's so by design,the \vbox is "vertically" centered around the baseline of the enclosing \hbox.
>
> Luatex inherited this behavior (no idea, if this really is a good thing, the (ht + dp) / 2 shift adjustment in the code looks a bit arbitrary imho, and there hasn't been much RTT activity yet).
>
Then it would be better for me to utilize virtual font mechanism
instead of relying on RTT mode. The procedure would be as follows.
1. Rotate glyphs by 90 degree and move it to the origin
2. Assign character width = vwidth
3. Assign character height and depth according to the bounding box
4. Rotate the entire page or a box by -90 degree
This is an old-fashioned way to do vertical typesetting with TeX; but
it surely works as far as the font provides vertical metrics and some
vertical glyphs.
Thanks anyway.
Regards,
--
Dohyun Kim
College of Law, Dongguk University
Seoul, Republic of Korea
More information about the luatex
mailing list