When you want to get horizontal or vertical with some character, don't ask Uniscribe where to go

by Michael S. Kaplan, published on 2011/08/30 07:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2011/08/30/10202389.aspx


Vinay asked:

Hi
There are cases when copying a glyph from charmap into WORD rotates it 90 degree or sometimes 180 degree "in case of Vertical writing".

Does this information about rotation come from Uniscribe and if yes,how to get this info??

Examples of glyphs which are rotated 180 degree in vertical writing are U+2523,U+2517,etc and most other glyphs are rotated 90 degree(braces,brackets,etc).

Please help me how does uniscribe help me to sort out the degree of rotation for a glyph in case of vertical writing.

This really isn't a Uniscribe feature at all, Vinay!

It's a font feature - with the fonts containing the glyphs to use when you are writing in vertical mode.

When no vertical substitute is specified, the character just gets rotated.

Now knowing what characters to rotate and what ones not to is something widely understood by font foundries, but there's no Win32 function that has the info (since fonts don't need to call such a function just to do what they already know what to do anyway).

I suppose it would be potentially be interesting data for Unicode to provide as a property. Though it would perhaps then have to be extended beyond Han and Kana and into other scripts as well.

No one has yet volunteered to write the Unicode Technical Report for the UVA (the Unicode Vidi Algorithm).

Though UVA makes a great backformation of an idea, doesn't it? :-)


John Cowan on 30 Aug 2011 10:51 AM:

unicode.org/.../RobustVerticalLayout.pdf pretty much lays it out for you (ahem).  Essentially, you need to know two things about each character: its vertical bidirectional class, which can be T, B, or neutral; and its bi-orientation transformation class, which can be rotate or no-rotate.

I tried to persuade the UTC to add these as new character properties, but no luck.  Fortunately, you can for the most part infer them from the script property, with a few individual exceptions like U+4E00 δΈ€, which is rotated even though it's a CJKV ideograph.

Quppa on 31 Aug 2011 3:23 AM:

Speaking of vertical text layout, will its support in Windows Phone remain limited to Microsoft applications/UI?

www.istartedsomething.com/.../windows-phone-7-mango-east-asian-language-tidbits

The author mentions that the vertical text layout will be used in hubs/panoramas - apparently to reduce clipping, which makes little sense - in addition to the lock screen, but will probably not be available to third-party applications (I certainly can't find anything in the latest dev tools). However, does its presence in WP7 indicate that it is implemented somewhere in Silverlight, and might we see it make its way to WPF/Silverlight on the desktop?

Quppa on 31 Aug 2011 3:25 AM:

Another duplicate post... sorry. Either the 'Post' button takes two clicks to work, or I end up posting the same thing twice.


go to newer or older post, or back to index or month or day