font-language-override
Overrides language-specific glyph selection in OpenType fonts. Ensures correct rendering for specific languages.
Quick example
span.turkish { font-language-override: "TRK"; } Syntax
normal | <string>Quick facts
Initial value
normalInherited
Yes
Examples
Use language-specific font variants
span.french {
font-language-override: "FRA";
font-family: "OpenType-Variable-Font";
/* Uses French OpenType features */
} Tell the font to use a specific language's typographic rules and glyphs.
Normalize language codes
.italian-text {
font-language-override: "ITA";
/* Overrides the HTML lang attribute for font selection */
} Use font-language-override when HTML lang differs from desired font behavior.
font-language-override Browser Support
Limited availability 55% global usage
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Not ready for production without a fallback.
Common pitfalls
Requires OpenType font support
font-language-override only matters if the font has language-specific OpenType features. Most basic fonts don't.
Use actual lang attribute instead
In most cases, set the HTML lang attribute correctly instead of using font-language-override. It's clearer and benefits accessibility.