aboutsummaryrefslogtreecommitdiffstats
path: root/components/fonts/platform/windows/font.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/fonts/platform/windows/font.rs')
-rw-r--r--components/fonts/platform/windows/font.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/fonts/platform/windows/font.rs b/components/fonts/platform/windows/font.rs
index e33b2ad9d3e..74f592e63b9 100644
--- a/components/fonts/platform/windows/font.rs
+++ b/components/fonts/platform/windows/font.rs
@@ -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)