font-language-override

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 which are deigned 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 which 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

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

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 parents element.


请遵守《互联网环境法规》文明发言,欢迎讨论问题
扫码反馈

扫一扫,反馈当前页面

咨询反馈
扫码关注
返回顶部