servo/components/gfx/platform
Martin Robinson de47dfe5c1
fonts: Merge multiple methods into PlatformFont::descriptor() (#32115)
This combines `style()`, `boldness()`, `stretchiness()` into a
`descriptor()` method which is used when creating `FontTemplate`s for
web fonts. Eventually this method will simply read font tables using
skrifa. This is the first step.

In addition, `family_name()` and `face_name()` are removed. They were
only used for debugging and the `FontIdentifier` serves for that. On
Windows, this was adding another way in which font loading could fail,
without buying us very much. The path or URL to the font is more
important when debugging than the names in the font tables.

Closes #15103.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because they should not change
observable behavior.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox
is checked, so that we can help you if you get stuck somewhere along the
way.-->

<!-- Pull requests that do not address these steps are welcome, but they
will require additional verification as part of the review process. -->
2024-04-23 13:27:32 +00:00
..
freetype fonts: Merge multiple methods into PlatformFont::descriptor() (#32115) 2024-04-23 13:27:32 +00:00
macos fonts: Merge multiple methods into PlatformFont::descriptor() (#32115) 2024-04-23 13:27:32 +00:00
windows fonts: Merge multiple methods into PlatformFont::descriptor() (#32115) 2024-04-23 13:27:32 +00:00
mod.rs fonts: Rework platform font initialization (#32127) 2024-04-22 09:38:21 +00:00