servo/components/gfx
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
..
platform fonts: Merge multiple methods into PlatformFont::descriptor() (#32115) 2024-04-23 13:27:32 +00:00
tests fonts: Merge multiple methods into PlatformFont::descriptor() (#32115) 2024-04-23 13:27:32 +00:00
text Simplify FontHandle and rename it to PlatformFont (#32101) 2024-04-17 17:44:34 +00:00
Cargo.toml Remove FontContextHandle (#32038) 2024-04-12 10:39:32 +00:00
font.rs fonts: Merge multiple methods into PlatformFont::descriptor() (#32115) 2024-04-23 13:27:32 +00:00
font_cache_thread.rs fonts: Merge multiple methods into PlatformFont::descriptor() (#32115) 2024-04-23 13:27:32 +00:00
font_context.rs fonts: Rework platform font initialization (#32127) 2024-04-22 09:38:21 +00:00
font_template.rs fonts: Merge multiple methods into PlatformFont::descriptor() (#32115) 2024-04-23 13:27:32 +00:00
lib.rs fonts: Rework platform font initialization (#32127) 2024-04-22 09:38:21 +00:00
rendering_context.rs clippy: Fix remaining warnings in gfx for MacOS (#31669) 2024-03-15 12:14:36 +00:00