commit b532a30fb32886daa765f64eaf361574c3fb350c parent e3e54d7e24ed1758e939b24e43af4786ec7b5a9d Author: Minghua Wu <michael.wu1107@gmail.com> Date: Wed, 15 Oct 2025 08:22:36 +0000 Bug 1993515 [wpt PR 55313] - fonts: Do not apply synthetic bold if font is already bold for webfont on FreeType platform, a=testonly Automatic update from web-platform-tests move new test to wpt Signed-off-by: Minghua Wu <michael.wu1107@gmail.com> -- wpt-commits: c78811cf1e0ac734689d7f1bb9fa672d00a172df wpt-pr: 55313 Diffstat:
| A | testing/web-platform/tests/css/css-fonts/font-synthesis-weight-webfont-bold-ref.html | | | 18 | ++++++++++++++++++ |
| A | testing/web-platform/tests/css/css-fonts/font-synthesis-weight-webfont-bold.html | | | 24 | ++++++++++++++++++++++++ |
| A | testing/web-platform/tests/fonts/Lato-Bold.ttf | | | 0 |
3 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/testing/web-platform/tests/css/css-fonts/font-synthesis-weight-webfont-bold-ref.html b/testing/web-platform/tests/css/css-fonts/font-synthesis-weight-webfont-bold-ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html lang = "en"> + <meta charset="utf-8"> + <title>CSS Test: font synthesis weight: bold web font should not be "double emboldened"</title> + <style> + @font-face { + font-family: "lato"; + src: url(/fonts/Lato-Bold.ttf) + } + .test { + font-family: "lato"; + font-size: 3em; + } + </style> + + <p class="test">Filler text</p> +</html> +\ No newline at end of file diff --git a/testing/web-platform/tests/css/css-fonts/font-synthesis-weight-webfont-bold.html b/testing/web-platform/tests/css/css-fonts/font-synthesis-weight-webfont-bold.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html lang = "en"> + <meta charset="utf-8"> + <title>CSS Test: font synthesis weight: bold web font should not be "double emboldened"</title> + <link rel="match" href="font-synthesis-weight-webfont-bold-ref.html"> + <link rel="help" href="https://www.w3.org/TR/css-fonts-4/#font-synthesis-weight"> + <meta name="assert" content=" If font face is already bold, user agents must not synthesize bold face again"> + <style> + @font-face { + font-family: "lato"; + src: url(/fonts/Lato-Bold.ttf) + } + .test { + font-family: "lato"; + font-size: 3em; + } + .synth { + font-weight: bold; + } + </style> + + <p class="test synth">Filler text</p> +</html> +\ No newline at end of file diff --git a/testing/web-platform/tests/fonts/Lato-Bold.ttf b/testing/web-platform/tests/fonts/Lato-Bold.ttf Binary files differ.