mirror of
https://github.com/servo/servo.git
synced 2025-08-25 07:08:21 +01:00
chore: fix warnings for Windows-specific fonts code (#37063)
Fix warnings from `components/fonts/platform/windows/font.rs` and `components/fonts/platform/windows/font_list.rs` due to deprecations from dwrote. Testing: none, should behave as it did before --------- Signed-off-by: Ashwin Naren <arihant2math@gmail.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
856ffa6ecb
commit
cebb1619ae
2 changed files with 19 additions and 7 deletions
|
@ -132,7 +132,9 @@ impl PlatformFontMethods for PlatformFont {
|
|||
pt_size: Option<Au>,
|
||||
) -> Result<PlatformFont, &'static str> {
|
||||
let font_face = FontCollection::system()
|
||||
.get_font_from_descriptor(&font_identifier.font_descriptor)
|
||||
.font_from_descriptor(&font_identifier.font_descriptor)
|
||||
.ok()
|
||||
.flatten()
|
||||
.ok_or("Could not create Font from descriptor")?
|
||||
.create_font_face();
|
||||
Self::new(font_face, pt_size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue