EPUBCheck CSS-007: non-standard font type
Updated:
EPUBCheck CSS-007 is an info message: “Font-face reference "…" refers to non-standard font type "…".” An @font-face rule points to a font in a format EPUB does not list as a core font type. EPUB's core font types are TrueType, OpenType, WOFF and WOFF2; other formats may be ignored and the text shown in a default font. EPUBCheck reports it as information.
The official message
Font-face reference "%1$s" refers to non-standard font type "%2$s".
- Default severity
- Info. Informative only. It does not make the EPUB invalid.
- EPUBCheck version
- 5.4.0
%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.
Typical causes
- Fonts in formats other than TrueType, OpenType, WOFF or WOFF2, such as EOT or SVG fonts.
- A font file listed in the manifest with an unusual media type.
How to fix it
- Open the file EPUBCheck names (the message gives the path, line and column) in a text or EPUB editor such as Sigil, or unzip the EPUB and open it there.
- Convert the font to WOFF2, WOFF, OpenType or TrueType, if its licence allows embedding and conversion.
- Update the src of the @font-face rule and the manifest item with the new file and media type (for example font/woff2).
- Or remove the @font-face rule and let the reading app use its own fonts.
- Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.
When it's not this
If the @font-face rule is empty, the warning is CSS-019.
Terms used here
Other CSS messages
CSS-006CSS selector specifies fixed position.CSS-008An error occurred while parsing the CSS: ….CSS-005Conflicting alternate style tags found: ….CSS-004CSS documents must be encoded in UTF-8, detected …;CSS-003CSS document is encoded in UTF-16. It should be encoded in UTF-8 instead.CSS-002Empty or NULL reference found.
Sources
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.