Ръководство за работа Отказ

Customize web font performance with font-display settings

Learn how to use font-display settings to modify web font performance.

The font-display setting allows you to specify how web fonts are loaded in the web browser and applied to your website. There are five font-display options:

Font-display value 

Behavior 

Auto

Allows the browser to use its default method to load the font.

Block

Hides the text on your website until the web font has downloaded. Your website visitors may see a Flash of invisible text or FOIT with this option.

Swap

Shows the fallback font that you have set in the CSS until the web font has downloaded. Your website visitors may see a Flash of unstyled text  or FOUT with this option.  

Fallback

Uses the block behavior for a short period, then switch to the swap behavior and apply the fallback font to the text. If the Web Fonts have not loaded by the end of the swap period, the fallback font remains in use. 

Optional

Uses the block behavior for a short period, then apply the fallback font to the text. The value gives the web browser the option of not downloading the web font at all, for example, if the website visitor is on a slow Internet connection. 

For technical details on font-display and the supported values, refer to the CSS Fonts Module Level 4 specification.

Бележка:

By default, web font projects are created with font-display set to auto.

To customize the font-display setting, follow the below steps:

  1. In your web projects page, click  Edit Project.

    Edit project
    Edit Project

  2. Select any of the following font-display values from the sidebar. By default, the font-display setting of web font projects is set to auto.  

    font display settings

  3. Click Save Changes and the font-display value is applied to your website within minutes.

The new font-display setting is automatically included in your website as part of the existing embed code.

Update existing web projects

Support for font-display was added to Adobe’s web font loading in September 2020. Web projects created before September 2020 have been updated to use the default font-display: auto behavior. 

The font-display setting for any existing project can be changed by following the above steps. Once you save the changes, the new font-display setting will be included in your website as part of the existing embed code. You do not need to make changes to the website itself. 

Получете помощ по-бързо и по-лесно

Нов потребител?