fonts: Initial draft of synthetic bold face for FreeType (#39519)

This is an initial attempt at implementing synthetic bold face for font
families that lack actual bold faces. The overall approach borrowed
implementations from Chromium and FireFox. WPT expectations will be
updated after https://github.com/servo/stylo/pull/244 lands

Testing: There are existing WPT testcases for font synthesis
(`wpt/css/css-fonts/font-synthesis-*`)

Depends on: https://github.com/servo/stylo/pull/244

---------

Signed-off-by: Minghua Wu <michael.wu1107@gmail.com>
Signed-off-by: minghuaw <michael.wu1107@gmail.com>
This commit is contained in:
minghuaw 2025-10-02 05:54:12 +08:00 committed by GitHub
parent 4ea363277e
commit bcd8bbb142
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 141 additions and 151 deletions

View file

@ -934,6 +934,7 @@ malloc_size_of_is_stylo_malloc_size_of!(style::values::computed::font::SingleFon
malloc_size_of_is_stylo_malloc_size_of!(style::values::computed::JustifyContent);
malloc_size_of_is_stylo_malloc_size_of!(style::values::specified::align::AlignFlags);
malloc_size_of_is_stylo_malloc_size_of!(style::values::specified::box_::Overflow);
malloc_size_of_is_stylo_malloc_size_of!(style::values::specified::font::FontSynthesis);
malloc_size_of_is_stylo_malloc_size_of!(style::values::specified::TextDecorationLine);
malloc_size_of_is_stylo_malloc_size_of!(stylo_dom::ElementState);