Skip to content

fonts: Do not apply synthetic bold if font is already bold for webfont on FreeType platform#39713

Merged
mrobinson merged 6 commits intoservo:mainfrom
minghuaw:fix/face-is-bold-webfont
Oct 9, 2025
Merged

fonts: Do not apply synthetic bold if font is already bold for webfont on FreeType platform#39713
mrobinson merged 6 commits intoservo:mainfrom
minghuaw:fix/face-is-bold-webfont

Conversation

@minghuaw
Copy link
Copy Markdown
Contributor

@minghuaw minghuaw commented Oct 8, 2025

This is to fix my oversight in the previous PR #39681 where the use of OS/2 table to determine a synthetic bold face should be applied is not applied to web font.

Testing: Added a new test tests/wpt/mozilla/tests/css/font_synthesis_weight_webfont_bold.html that checks if an already-bold webfont is "double emboldened"
Part of #39637

Signed-off-by: Minghua Wu <[email protected]>
@minghuaw minghuaw marked this pull request as ready for review October 8, 2025 08:29
Signed-off-by: Minghua Wu <[email protected]>
@xiaochengh
Copy link
Copy Markdown
Contributor

tests/wpt/mozilla are our private tests. Are there existing tests in WPT, or if not, could you move the new tests to tests/wpt/tests/css/css-fonts/?

@minghuaw
Copy link
Copy Markdown
Contributor Author

minghuaw commented Oct 8, 2025

tests/wpt/mozilla are our private tests. Are there existing tests in WPT, or if not, could you move the new tests to tests/wpt/tests/css/css-fonts/?

Sure. Do we need to open an issue or something on the WPT repo?

Edit: seems like this is automatically handled by the WPT sync bot

Signed-off-by: Minghua Wu <[email protected]>
@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#55313) with upstreamable changes.

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#55313).

Signed-off-by: Minghua Wu <[email protected]>
@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#55313).

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#55313) title and body.

Copy link
Copy Markdown
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

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

Thanks!

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Oct 9, 2025
@mrobinson mrobinson added this pull request to the merge queue Oct 9, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 9, 2025
Merged via the queue into servo:main with commit 3ae886d Oct 9, 2025
26 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 9, 2025
@minghuaw minghuaw deleted the fix/face-is-bold-webfont branch October 9, 2025 10:42
github-merge-queue bot pushed a commit that referenced this pull request Oct 9, 2025
This PR follows #39519 and adds
synthetic bold face support for MacOs platform.

Testing: There are existing WPT testcases for font synthesis
(wpt/css/css-fonts/font-synthesis-*). A new test checking that a bold
face font does not get "double emboldened" is getting added in #39713
Part of #39637

---------

Signed-off-by: minghuaw <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants