Skip to content

Add optional annotation to parameters in FontFaceSet methods#44352

Merged
chrisdavidmills merged 3 commits into
mdn:mainfrom
Juneezee:docs/fontfaceset-optional-parameters
Jun 9, 2026
Merged

Add optional annotation to parameters in FontFaceSet methods#44352
chrisdavidmills merged 3 commits into
mdn:mainfrom
Juneezee:docs/fontfaceset-optional-parameters

Conversation

@Juneezee

@Juneezee Juneezee commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Description

This PR updates the following pages to include the inline Optional label for their optional parameters:

Motivation

Adding the Optional label improves readability, prevents confusion about which arguments are strictly required, and maintains consistency with the rest of the MDN Web API reference pages.

Additional details

Related issues and pull requests

@Juneezee Juneezee requested a review from a team as a code owner June 4, 2026 04:58
@Juneezee Juneezee requested review from chrisdavidmills and removed request for a team June 4, 2026 04:58
@github-actions github-actions Bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Jun 4, 2026
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Preview URLs (3 pages)

External URLs (2)

URL: /en-US/docs/Web/API/FontFaceSet/check
Title: FontFaceSet: check() method


URL: /en-US/docs/Web/API/FontFaceSet/load
Title: FontFaceSet: load() method

(comment last updated: 2026-06-09 08:02:31)

@chrisdavidmills chrisdavidmills left a comment

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.

Thanks, @Juneezee. I've got some comments for you.

Comment thread files/en-us/web/api/fontfaceset/check/index.md Outdated
Comment thread files/en-us/web/api/fontfaceset/check/index.md Outdated
Comment thread files/en-us/web/api/fontfaceset/foreach/index.md
Comment thread files/en-us/web/api/fontfaceset/load/index.md Outdated
Reference: #44352 (review)
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

@Juneezee Juneezee left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@chrisdavidmills Thanks for reviewing the PR. I have addressed your comments and the changes are ready for your review.

- : limit the font faces to those whose Unicode range contains at least one of the characters in text. This [does not check for individual glyph coverage](https://lists.w3.org/Archives/Public/www-style/2015Aug/0330.html).
- : A font specification using the syntax for the CSS {{cssxref("font")}} property, for example `"italic bold 16px Roboto"`
- `text` {{optional_inline}}
- : Limit the font faces to those whose Unicode range contains at least one of the characters in text. This [does not check for individual glyph coverage](https://lists.w3.org/Archives/Public/www-style/2015Aug/0330.html). Defaults to [a string containing a single space character (U+0020 SPACE) `" "`](https://drafts.csswg.org/css-font-loading/#find-the-matching-font-faces).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let me know if you think it is better to inform the user about this default value via an alert

Note

According to CSS Font Loading Module Level 3 specification,

  1. If text was not explicitly provided, let it be a string containing a single space character (U+0020 SPACE).

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.

No, what you've done is fine, although see my comments.

@Juneezee Juneezee requested a review from chrisdavidmills June 8, 2026 16:44

@chrisdavidmills chrisdavidmills left a comment

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.

@Juneezee, a couple more comments for you. Nearly there!

Comment thread files/en-us/web/api/fontfaceset/check/index.md Outdated
Comment thread files/en-us/web/api/fontfaceset/load/index.md Outdated
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
@Juneezee Juneezee requested a review from chrisdavidmills June 9, 2026 07:48

@chrisdavidmills chrisdavidmills left a comment

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.

OK, this looks ready to merge. Thanks again, @Juneezee!

@chrisdavidmills chrisdavidmills merged commit 0a7be37 into mdn:main Jun 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants