Let's get vertical

by Michael S. Kaplan, published on 2005/08/04 15:00 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/08/04/447759.aspx


(computerized apologies to Olivia Newton John)

Dmilat asked (in the Suggestion Box):

@-prefixed fonts

If you try to manually type a font name like @Arial Unicode MS in MS Word font selection combo-box and then enter a text with some CJK hieroglyphs (make sure the font name did not change), those characters will be turned 90 degree. I believe this allows for vertical text layout that may be used by people from east asian countries. What is amazing that I failed to find any info on that in MSDN. Is it kind of undocumented feature ? Can you give more info on that ?

This feature has been around for a long time, actually. I look in Nadine Kano's book for the first time I had seen mention of it (see the mention here in Vertical Writing and Printing). An excerpt here:

As the following illustration shows, displaying text vertically doesn't mean that you simply rotate an entire line of text by 90 degrees. Most characters remain upright, but others, such as those identified by arrows, change orientation.

Fortunately, with Win32 you don't need to write code to rotate characters. To display text vertically on Windows, enumerate the available fonts as usual and select a font whose typeface name begins with the at (@) character. Then create a LOGFONT structure, setting both the escapement and the orientation to 270 degrees. Calls to TextOut are the same as for horizontal text.

The Far East Win32 SDK contains a sample application called TATE (short for tategaki, meaning "vertical writing") which demonstrates how to create fonts and display vertical text. Figure 7-22 shows a sample file displayed in TATE using a horizontal font. Selecting a vertical font from the Font dialog box (see Figure 7-23 below) causes the text to be displayed vertically. (See Figure 7-24 below.)

And so on. See the link for the full story. :-)

There are probably other mentions in both the Platform SDK and MSDN, but it is harder to find them with symbols like @ usually being ignored in searches. :-)

 

This post brought to you by "@" (U+ff20, FULLWIDTH COMMERCIAL AT)


# Maurits [MSFT] on 5 Aug 2005 3:37 PM:

What about 90º counterclockwise? For example, if I want to label the y-axis of a Cartesian graph?

# Maurits [MSFT] on 5 Aug 2005 3:39 PM:

why two different characters for @ and @?

# Michael S. Kaplan on 6 Aug 2005 7:16 AM:

If you want to rotate the other way, you have to do it yourself.

For the two versions, one is the WIDE version, for compat. with CJK legacy code pages....

Lance on 20 May 2011 5:59 PM:

... and if I don't have any fonts whose name begins with "@"??????

Michael S. Kaplan on 21 May 2011 8:33 AM:

No East Asian suppoort installed, probably....


Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

referenced by

2012/09/07 Let's stand up a moment. You know, Vertically...

2010/09/22 Looking at life a bit more vertically, for a moment...

2009/09/23 Search engines still don't know what it is, or more to the point where it's @

2008/01/17 Expertise isn't always everything (aka When the one who is learning teaches us something important)

2007/12/01 A whole new spin on the term 'Vertical markets' (aka in SiaO we trust?)

2007/03/31 Rotate it when vertical?

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