CSS font-language-override Property

CSS font-language-override Property

 

CSS font-language-override Property



The font-language-override property controls the use of the language-specific glyphs. This property can be specified by two values: normal and <string>. The "string" must match a language tag. For example, "TRK" for Turkish.

By default, the HTML lang attribute instructs the browser to display glyphs that are designed for a certain language.

The font-language-override property overrides the typeface behavior for a specific language. It's helpful because when the typeface does not have proper rules in one language, you can use glyphs of another language that follow similar rules.

Initial Valuenormal
Applies toAll elements. It also applies to ::first-letter and ::first-line.
InheritedYes.
AnimatableDiscrete.
VersionCSS3
DOM Syntaxobject.style.fontLanguageOverride = "normal";

Syntax

font-language-override: normal | <string>;

Example of the font-language-override property:

<!DOCTYPE html>
<html>
  <head>
    <title>The title of the document </title>
    <style>
      .example1 {
        font-language-override: normal;
      }
      .example2 {
        font-language-override: "DAN";
      }
    </style>
  </head>
  <body>
    <h2>Font-language-override property example</h2>
    <p class="example1">Default language setting.</p>
    <p class="example2">Here the font-language-override is set to Danish.</p>
  </body>
</html>

Values

ValueDescription
normalInstructs the browser to use font glyphs that are appropriate for the language specified by the lang attribute. This is the default value of this property.
<string>Instructs the browser to use font glyphs specified by the string.
initialIt makes the property use its default value.
inheritIt inherits the property from its parent's element.
Reactions

Post a Comment

0 Comments

close