The font-variant-east-asian
CSS property controls the usage of alternate glyphs for East Asian scripts, like Japanese and Chinese.
font-variant-east-asian: normal; font-variant-east-asian: ruby; font-variant-east-asian: jis78; /* <east-asian-variant-values> */ font-variant-east-asian: jis83; /* <east-asian-variant-values> */ font-variant-east-asian: jis90; /* <east-asian-variant-values> */ font-variant-east-asian: jis04; /* <east-asian-variant-values> */ font-variant-east-asian: simplified; /* <east-asian-variant-values> */ font-variant-east-asian: traditional; /* <east-asian-variant-values> */ font-variant-east-asian: full-width; /* <east-asian-width-values> */ font-variant-east-asian: proportional-width; /* <east-asian-width-values> */ font-variant-east-asian: ruby full-width jis83; /* Global values */ font-variant-east-asian: inherit; font-variant-east-asian: initial; font-variant-east-asian: unset;
Initial value | normal |
---|---|
Applies to | all elements. It also applies to ::first-letter and ::first-line . |
Inherited | yes |
Media | visual |
Computed value | as specified |
Animation type | discrete |
Canonical order | order of appearance in the formal grammar of the values |
Syntax
Values
normal
- This keyword leads to the deactivation of the use of such alternate glyphs.
ruby
- This keyword forces the use of special glyphs for ruby characters. As these are usually smaller, font creators often designs specific forms, usually slightly bolder to improve the contrast. This keyword corresponds to the OpenType values
ruby
. <east-asian-variant-values>
- These values activate the figures defined in specific standard. Possible values are:
Keyword Standard defining the glyphs OpenType equivalent jis78
JIS X 0208:1978 jp78
jis83
JIS X 0208:1983 jp83
jis90
JIS X 0208:1990 jp90
jis04
JIS X 0213:2004 jp04
simplified
None, use the simplified Chinese glyphs smpl
traditional
None, use the traditional Chinese glyphs trad
<east-asian-width-values>
- These values control the sizing of figures used for East Asian characters. Two values are possible:
proportional-width
activating the set of figures where numbers are not all of the same size. It corresponds to the OpenType valuespwid
.full-width
activating the set of figures where numbers are all of the same size, allowing them to be easily aligned like in tables. It corresponds to the OpenType valuesfwid
.
Formal syntax
normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]where
<east-asian-variant-values> = [ jis78 | jis83 | jis90 | jis04 | simplified | traditional ]
<east-asian-width-values> = [ full-width | proportional-width ]
Examples
HTML
<p class="normal">!</p>
CSS
p { font-variant-east-asian: ruby; }
Result
Specifications
Specification | Status | Comment |
---|---|---|
CSS Fonts Module Level 3 The definition of 'font-variant-east-asian' in that specification. |
Candidate Recommendation | Initial definition |
Browser Compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 63 | No | 34 24 — 341 | No | 50 | No |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic support | 63 | 63 | No | 34 24 — 341 | No | 50 | No |
1. From version 24 until version 34 (exclusive): this feature is behind the layout.css.font-features.enabled
preference (needs to be set to true
). To change preferences in Firefox, visit about:config.
Document Tags and Contributors
Tags:
Contributors to this page:
HarJIT,
mfluehr,
fscholz,
pborenstein,
ledakis,
Ruggero,
Sebastianz,
teoli
Last updated by:
HarJIT,