Skip to content

Use WOFF2 examples in @font-face docs #44262

Open
s4daexe wants to merge 6 commits into
mdn:mainfrom
s4daexe:fix-woff2-font-examples
Open

Use WOFF2 examples in @font-face docs #44262
s4daexe wants to merge 6 commits into
mdn:mainfrom
s4daexe:fix-woff2-font-examples

Conversation

@s4daexe
Copy link
Copy Markdown
Contributor

@s4daexe s4daexe commented May 26, 2026

Summary

Updates the @font-face examples to use WOFF2 font files instead of OTF files, following modern web font best practices.

Fixes #42936

@s4daexe s4daexe requested a review from a team as a code owner May 26, 2026 13:52
@s4daexe s4daexe requested review from chrisdavidmills and removed request for a team May 26, 2026 13:52
@github-actions github-actions Bot added Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed labels May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 26, 2026

Preview URLs (2 pages)

Flaws (4)

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/CSS/Reference/At-rules/@font-face
Title: @font-face CSS at-rule
Flaw count: 1

  • macros:
    • Macro csssyntax produces link /en-US/docs/Web/CSS/Reference/Values/declaration-list which doesn't resolve

URL: /en-US/docs/Web/CSS/Reference/At-rules/@font-face/src
Title: src CSS at-rule descriptor
Flaw count: 3

  • macros:
    • Macro cssinfo produces link /en-US/docs/Web/CSS/@font-face which is a redirect
    • Macro csssyntax produces link /en-US/docs/Web/CSS/Reference/Values/font-src-list which doesn't resolve
    • Macro csssyntaxraw produces link /en-US/docs/Web/CSS/Reference/Values/url which doesn't resolve

(comment last updated: 2026-05-27 11:04:49)

Copy link
Copy Markdown
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there, @s4daexe, and thanks for your work on this. This is going in the right direction, but there is still more work to do here:

  1. In the example you have edited, your edits mean that the second line starting with url(...) is now the same as the third. You should just delete the second one of these.
  2. More seriously, this issue is not just present on the one page you have edited. It is present on all the child descriptor pages, too. It would be good for you to fix the problem there, too.

@github-actions github-actions Bot added size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels May 26, 2026
Comment on lines 234 to +236
src:
url("MgOpenModernaBoldIncr.otf") format("opentype") tech(incremental),
url("MgOpenModernaBold.otf") format(opentype);
url("MgOpenModernaBoldIncr.woff2") format("woff2")
url("MgOpenModernaBold.woff2") format("woff2")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[mdn-linter] reported by reviewdog 🐶

Suggested change
src:
url("MgOpenModernaBoldIncr.otf") format("opentype") tech(incremental),
url("MgOpenModernaBold.otf") format(opentype);
url("MgOpenModernaBoldIncr.woff2") format("woff2")
url("MgOpenModernaBold.woff2") format("woff2")
src: url("MgOpenModernaBoldIncr.woff2") format("woff2")
url("MgOpenModernaBold.woff2") format("woff2");

s4daexe and others added 4 commits May 26, 2026 19:43
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Labels

Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use the WOFF2 container instead of raw TTF/OTF formats

2 participants