Skip to content

Simplify various font references throughout Gutenberg for i18n #59751

Closed

Description

@jaapwiering

Problem

The term "font face" causes confusion in the translation of the Gutenberg plugin. It is currently used as a synonym for "typeface" and "font", but not the correct meaning and complicates translations.

What is a "font face"?

The term "font-face" (note the dash) was introduced around 1997 in CSS2 as an at-rule to "bridge between a font reference (within a stylesheet) and the font data" (https://www.w3.org/TR/WD-font-970721#AtRule).

All properties relating to typefaces in CSS use the prefix font-. But the choice of "font-face" was the root of some confusion, since it is associated with "typeface" and "font". The two words have slightly different meanings but are often used as synonyms for each other.

"Typeface" is a collection of letters and characters under one name with a quite similar appearance, and basically a directory. In CSS, this is called a font-family. This collection contains at least one set of letters and characters, called a "font". A font can be "regular", "italic", "bold", "condensed", "light" et cetera, and also a combinations like "bold italic condensed". The visual features of a font are referred to in CSS with the properties font-style, font-weight, font-variant, and sometimes font-stretch.

For example, the typeface Ubuntu (https://fonts.google.com/specimen/Ubuntu) has 8 fonts: Light, Light Italic, Regular, Regular Italic, Medium, Medium Italic, Bold and Bold Italic. This typeface consists of at least 8 different files.

The terms typeface and font are used as a synonym, and this causes hardly any confusion. Now enters "font face": for the English speaking, this is only another synonym.

The meaning of "font face"

In the strings for (Dutch) translation containing the term "face"
https://translate.wordpress.org/projects/wp-plugins/gutenberg/dev/nl/default/?filters%5Bterm%5D=face&filters%5Bterm_scope%5D=scope_any&filters%5Bstatus%5D=current_or_waiting_or_fuzzy_or_untranslated&filters%5Buser_login%5D=&filter=Apply+Filters&sort%5Bby%5D=priority&sort%5Bhow%5D=desc a few meanings appear.

"font-face definition in theme.json format."

Refers to the CSS at-rule, so this is definitely correct.

"No font faces were installed."

Refers to files, so that must be a font. An at-rule is declared, not installed.

"URL to a preview image of the font face."

Only a few people know what a typeface looks like when they see the name. So that image will be very helpful. It could be a typeface if few styles are shown. Otherwise, it will be a font.

"The IDs of the child font faces in the font family."

This is a hard one. The declaration of a font-face consists of a font-family and a src to local and remote files. The children of a font-family are fonts, so declared with font-style, font-weight, et cetera. So I guess that the child font faces are actually fonts.

Solution: use font-face for CSS only

The hard thing about writing and translating is use the correct terms and to avoid ambiguity. Currently, "font face" could be an at-rule, a file, a directory, an image, a typeface or a font.

The term "font face" was introduced in CSS ages ago. It is used for specifying local and web fonts. Let us stick to that meaning and nothing else. A font-face can be defined, declared, specified and can't be uploaded and installed.

I suggest using the term "font-face" with a dash to enhance the relation with the CSS-rule.

Additional props: @remkus, @NekoJonez, @jeroenrotty, @psmits1567

Activity

  1. changed the title [-]Simplify various font references throughout Gutenberg for i18[/-] [+]Simplify various font references throughout Gutenberg for i18n[/+] on Mar 11, 2024
  2. youknowriad commented on Oct 18, 2026

    @youknowriad
    Contributor

    Thank you for the thorough terminology write-up, @jaapwiering. The strings quoted here no longer live in Gutenberg. "No font faces were installed." was removed from the Font Library UI in #59451, and the REST schema descriptions ("The IDs of the child font faces in the font family.", "URL to a preview image of the font face.") left the plugin with the WordPress 6.5 compat code in #64096. They now exist only in WordPress core's font REST controllers (class-wp-rest-font-families-controller.php and class-wp-rest-font-faces-controller.php), and Gutenberg's own translatable strings no longer use "font face". Since nothing here can change in this repository anymore, I'm closing this. Please open a ticket on core Trac (components Fonts / I18N) with this analysis so those remaining strings can be reworded there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Internationalization (i18n)Issues or PRs related to internationalization efforts[Feature] TypographyFont and typography-related issues and PRs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions