Skip to content
EPUBCheck · Stylesheets

EPUBCheck CSS-028: font-face declaration used

Updated:

EPUBCheck CSS-028 is a usage message: “Use of Font-face declaration.” The book declares fonts with @font-face. This is a usage note shown only with EPUBCheck's -u option, to record that the book embeds or references fonts; it is not a problem in itself.

The official message

Use of Font-face declaration.

Default severity
Usage. Informative only and hidden by default: it appears when EPUBCheck runs with -u (--usage). It does not make the EPUB invalid.
EPUBCheck version
5.4.0

Typical causes

  • Any stylesheet that embeds a font with @font-face.
  • Fonts added by a conversion or design tool for headings, drop caps or non-Latin scripts.

How to fix it

  1. Nothing to fix because of this note.
  2. Check that each font's licence allows embedding, and that each font file is in the manifest with a core font media type (font/woff2, font/woff, font/otf or font/ttf).
  3. Remember that many reading apps let readers override embedded fonts, so the text must work without them.

When it's not this

If the font format is not a core type, EPUBCheck adds CSS-007; an empty rule is CSS-019.

Terms used here

Other CSS messages

  • CSS-029 Found CSS class name "…" but no "…" property was declared in the package document.
  • CSS-030 The package document declares media overlays styling class names but no CSS was found in the content document.
  • CSS-019 CSS font-face declaration has no attributes.
  • CSS-015 Alternative style sheets must have a title.
  • CSS-008 An error occurred while parsing the CSS: ….
  • CSS-007 Font-face reference "…" refers to non-standard font type "…".

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck CSS-028 mean?

EPUBCheck CSS-028 is a usage message: “Use of Font-face declaration.” The book declares fonts with @font-face. This is a usage note shown only with EPUBCheck's -u option, to record that the book embeds or references fonts; it is not a problem in itself.

Is CSS-028 an error?

CSS-028 is reported as usage by default. Informative only and hidden by default: it appears when EPUBCheck runs with -u (--usage). It does not make the EPUB invalid.