CSS font-language-override Property
Description
The font-language-override
CSS property is used to specify language-specific font preferences for text within an element. It allows web developers to control the font used for specific languages within a block of text, overriding the default font settings. This property is particularly useful for ensuring proper rendering of characters and scripts that may not be supported by the default font or for achieving a specific typographic effect. By setting font-language-override, you can ensure that the appropriate font is applied for each language, improving the readability and aesthetics of your web content for multilingual audiences.
- Initial value
- normal
- Applies to
- All elements
- Inherited
- Yes
- Computed value
- As specified
- Animatable
- No
- JavaScript syntax
- object.style.fontLanguageOverride
Syntax
font-language-override: normal | <string>
Values
- normalSpecifies that when rendering with OpenType fonts, the content language of the element is used to infer the OpenType language system.
- <string>Single three-letter case-sensitive OpenType language system tag, specifies the OpenType language system to be used instead of the language system implied by the language of the element.
Example
<p class="para1">Default language setting.</p>
<p class="para2">
This is a string with the <code>font-language-override</code> set to Danish.
</p>
p.para1 {
font-language-override: normal;
}
p.para2 {
font-language-override: "DAN";
}
Browser Support
The following table will show you the current browser support for the CSS font-language-override
property.
Desktop | |||||
x | x | 34 | x | x |
Tablets / Mobile | |||||
x | 34 | x | x | x | x |
Last updated by CSSPortal on: 31st December 2023