W3C home > Mailing lists > Public > www-style@w3.org > June 2010

RE: [css-fonts] Is it possible to select a vertical variant in a font?

From: Ishii Koji <kojiishi@gluesoft.co.jp>
Date: Wed, 16 Jun 2010 23:43:32 -0400
To: Ken Lunde <lunde@adobe.com>, John Hudson <tiro@tiro.com>
CC: John Daggett <jdaggett@mozilla.com>, "www-style@w3.org" <www-style@w3.org>, David Lemon <lemon@adobe.com>
Message-ID: <A592E245B36A8949BDB0A302B375FB4E09E910C6C4@MAILR001.mail.lan>
Thank you Ken and John for the deep explanations.

I should have better clarified what I wanted to do. I wanted to create an HTML document that describes how a glyph changes its form in its vertical variant, and to show an example, I wanted to use a vertical variant glyph in the document.

Fantasai taught me that it cannot be done with current HTML and CSS.

Are there any possibility for future CSS font module to select the vertical variant?

-----Original Message-----
From: Ken Lunde [mailto:lunde@adobe.com] 
Sent: Thursday, June 17, 2010 8:24 AM
To: John Hudson
Cc: Ishii Koji; John Daggett; www-style@w3.org; David Lemon
Subject: Re: [css-fonts] Is it possible to select a vertical variant in a font?

John & Ishii-san,

The "@" prefix is an extraordinarily outdated Windows-specific convention for labeling the vertical instances of fonts. Now, the preferred method is to use the metrics in the vertical tables ('vhea', 'vmtx', and 'VORG') and any appropriate vertical GSUB/GPOS features when the application is composing vertical text.

The 'vrt2' GSUB feature is generally a superset of the 'vert' GSUB feature, and at least for our OpenType CJK fonts, includes pre-rotated forms of glyphs that are not full-width, such as those for proportional Latin. The 'vkna' GSUB feature substitutes standard kana glyphs (that are used for both horizontal and vertical writing) for those that are tuned for use in vertical writing. These glyphs were added in Adobe-Japan1-4, so unless the 'CFF' table advertises its ROS as Adobe-Japan1-4 or higher, which means Adobe-Japan1-5 or Adobe-Japan1-6 at the moment, the 'vkna' GSUB feature is likely not included. (The horizontal analog of 'vkna' is 'hkna'.)

About the GPOS features that were mentioned, 'valt' has been deprecated. Actually, it was deprecated before we released our first OpenType CJK fonts. We found that a better solution was to include 'vmtx' table overrides to accomplish the same thing, which results in default behavior. So, this GPOS feature should be ignored. The 'vhal' and 'vpal' GPOS features apply alternate metrics to glyphs that are normally full-width, specifically half-width and proportional, respectively. The 'vkrn' GPOS feature is for vertical kerning, and if the font includes the 'palt' GPOS feature, the palt' feature must also be turned on for the run of text if the 'vkrn' GPOS feature is used. The same relationship applies to the horizontal analogs, meaning 'kern' and 'palt'.

I hope this helps...

-- Ken

On 2010/06/16, at 9:13, John Hudson wrote:

> Ishii Koji wrote:
>> I agree that prepending "@" isn't a good way to go. I'm thinking to display some of glyphs from the vertical glyph set of a font in my product plan, and wondering if there's a better and standardized way to do it. It sounds like the answer is no.
>> Is it possible to consider for future additions? If CSS is going to support font variants feature in OpenType--although I'm not sure if similar feature is available in other font format but I guess so--maybe vertical could also be added as part of the efforts. I couldn't find that kind of variants support either though.
> In OpenType Layout, the relevant features for vertical glyph 
> substitutions are
> http://www.microsoft.com/typography/otspec/features_uz.htm#vert
> http://www.microsoft.com/typography/otspec/features_uz.htm#vkna
> http://www.microsoft.com/typography/otspec/features_uz.htm#vrt2
> (although I'm not sure why a separate feature is needed/used for Kana)
> and for vertical glyph spacing are
> http://www.microsoft.com/typography/otspec/features_uz.htm#valt
> http://www.microsoft.com/typography/otspec/features_uz.htm#vhal
> http://www.microsoft.com/typography/otspec/features_uz.htm#vpal
> http://www.microsoft.com/typography/otspec/features_uz.htm#vkrn
> I'm cc'ing this to Ken Lunde at Adobe, who should be able to provide 
> more information on these features, how they are implemented in 
> Adobe's CJK fonts, and perhaps how they might be implemented via CSS.
> John Hudson
Received on Thursday, 17 June 2010 03:44:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:47 UTC