CSS - font-language-override
The font-language-override
CSS property controls the usage of language-specific glyphs in a typeface.
Example
HTML
<p class="para1"> Default language setting.</p> <p class="para2">This is a string with the <code>font-language-override</code> set to <code>Danish</code></p>
CSS
p.para1 { font-language-override: none; } p.para2 { font-language-override: "DAN"; }
Result
Syntax
font-language-override: normal font-language-override: "TRK" /* Global values */ font-language-override: initial font-language-override: inherit font-language-override: unset
Values
normal
- This keyword forces the browser to use glyphs defined for the given language in the font.
<string>
- This keyword forces the browser to use the language defined by the string. The values are the OpenType language system strings.
Formal syntax
normal <a href="css/value_definition_syntax#single_bar" title="Single bar">|</a> <a href="css/string" title=""><string></a>
Description
The font-language-override
CSS property controls the usage of language-specific glyphs in a typeface.
By default, browsers use the HTML global attribute lang
to determine the language of the text contained in an element; with this information, they use special glyphs designed for that language. For example, a lot of font have a special character for the digraph fi
, making the dot on the i
merge with the previous character. This ligature should not be used when displaying turkic language as they have two i (i
and ı
), one with a dot and one dotless: using the ligature would transform a dotted i in a dotless i.
Sometimes the author want to override this language: like if the typeface doesn't know about the azeri language, that, like the turkish one, has a dotless i. In that case, the font-language-override
can be used to force the use of the turkish glyphs, better suited for azeri than the default one.
Initial value | normal |
---|---|
Applies to | all elements. It also applies to ::first-letter and ::first-line . |
Inherited | yes |
Media | visual |
Computed value | as specified |
Animatable | no |
Canonical order | the unique non-ambiguous order defined by the formal grammar |
See Also
Specifications
Specification | Status | Comment |
---|---|---|
CSS Fonts Module Level 3 The definition of 'font-language-override' in that specification. |
Candidate Recommendation | Initial definition |
Feature | Firefox (Gecko) | Chrome | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 4.0 (2.0) -moz 34 (34) [1] |
? | ? | ? | ? |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | ? | 4.0 (2.0) -moz 34.0 (34)[1] |
? | ? | ? |
[1] Experimental unprefixed implementation was available since Gecko 24. It was governed by the preference layout.css.font-features.enabled
defaulting to true
on Nightly and Aurora only.
License
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/css/font-language-override