Specifying Japanese font face variants
By specifying <font-variant-east-asian> values for ‘
font-variant’, you can control the glyphs used for East Asian scripts, provided that the current font both includes the glyphs (such as Japanese kanji variants) and supports the OpenType substitute feature. Within <font-variant-east-asian>, glyph forms can be controlled with <east-asian-variant-values>, and a font rendering can be controlled with <east-asian-width-values>. Supported values for <east-asian-variant-values> are ‘jis78’, ‘jis83’, ‘jis90’ and ‘jis04’ (the JIS-defined fonts) as well as ‘simplified’ (simplified Chinese), ‘traditional’ (traditional Chinese), ‘hojo-kanji’ (supplementary kanji) and ‘nlckanji’ (NCD: National Language Council-defined font). Supported values for <east-asian-width-values> are ‘full-width’, ‘half-width’, ‘third-width’, ‘quarter-width’ and ‘proportional-width’. ‘full-width’ displays a fixed-width font while ‘proportional-width’ displays a proportionally-spaced font. However, please note that each value has an effect only when the font supports that feature, such as glyph variants.
In order to display a font face specified by a <font-variant-east-asian> variant, the font must support the specified feature. This sample specifies font-family: Hiragino Mincho Pro;, because that font supports the features being used. If there is no applicable font in the environment, the FO file will not render correctly. If so, please instead see the result PDF provided alongside the FO file.
When ‘font-variant’ is not specified, the normal glyphs are displayed:
鯵 壷 桧 藪 籠 学 国 麹 醤 掻 填 泡
With font-variant="jis78", the JIS78 forms of the characters, if available, are displayed:
鯵 壷 桧 藪 籠 学 国 麹 醤 掻 填 泡
By specifying <east-asian-width-values>, Japanese kana letters etc. can be drawn with either a fixed-width font or a proportionally-spaced font.
Without specifying ‘font-variant’:
"プロポーショナル"に描画
With
font-variant: full-width:
"プロポーショナル"に描画
With
font-variant: proportional-width:
"プロポーショナル"に描画