« How to add RDF information to a page using RDFa? | Main | utf-8 Growth On The Web »

Vertical Layouts for Canvas Text (CJK)

I have noticed a discussion (I have cut some parts for readability) about vertical layout for text from the participants of the HTML WG.

<Hixie> ok for canvas text my proposal is:

<Hixie> drawHString(x, y, maxWidth, textAlign, s); and drawHString(x, y, maxHeight, textAlign, s);

<Hixie> drawVString(...) for the second one

<Lachy> what's the difference between them? drawVString for vertical stings where the letters are stacked on top of each other, and not just rotated 90 deg?

<Philip`> Hixie: They look complex and hard to use :-p

<Philip`> compared to e.g. translate(x,y);drawString(s)

<Hixie> lachy: drawVString() would be for vertical text (e.g. some CJK)

<Hixie> one is lack of support for vertical text :-)

In printed media, it is handled quite well for a long time. Japanese books have some complex layouts mixing western and japanese characters.

Japanese Typography

It happens not only in CJK (Chinese Japanese Korean) texts. Think about a neon sign of an hotel with the letters written vertically.

Felix Sasaki is my colleague at W3C/Keio and has worked with the Japanese Layout Task Force. He was sitting next to me when I was reading the logs of the discussion, so I just asked him some references. He sent me a link to 1.3 Directional Factors in Japanese Text Layout from the Requirements of Japanese Text Layout. He also reminded me about XSL 1.1: 7.29.3 "glyph-orientation-vertical" .

Wikipedia has a page on the topic of Horizontal and vertical writing in East Asian scripts and Unicode a note on Robust Vertical Text Layout.

All of that should help to define the API for Canvas Text.

Filed by Karl Dubost on May 2, 2008 3:35 AM in HTML, Reference
| | Comments (1) | TrackBacks (0)

Comments

Ian Hickson # 2008-05-02

Yup, I was reading most of the above (as well as CSS3 text and XSL:FO, and studying actual graphics and charts on japanese sites) when doing my research for this. Thanks for the link to jlreq btw, didnt' know about that one.

Note that we're not trying to do full typography here, we're trying to do an immediate mode graphics API. The needs are different from the needs of book publishers. :-)

Leave a comment

Note: this blog is intended to foster polite on-topic discussions. Comments failing these requirements and spam will not get published. Please, enter your real name and email address. Every individual comment is reviewed by the W3C staff. This may take some time, thank you for your patience.

You can use the following HTML markup (a href, b, i, br/, p, strong, em, ul, ol, li, blockquote, pre) and/or Markdown syntax.

Your comment


About you

This blog is written by W3C staff and working group participants,
 and maintained by Karl Dubost and olivier Thereaux.
Powered by Movable Type, magpierss and a lot of Web Technology