aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/platform/macos
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-03-14 18:40:54 +0100
committerGitHub <noreply@github.com>2024-03-14 17:40:54 +0000
commitad37a54f59f4eef2c8f815a3a59ab7d928b2946f (patch)
treee78d14062c6f8d807411ee535d0e426b9798f6aa /components/gfx/platform/macos
parent4597aeae5f9b1d76d6af664afdbb72647908e907 (diff)
downloadservo-ad37a54f59f4eef2c8f815a3a59ab7d928b2946f.tar.gz
servo-ad37a54f59f4eef2c8f815a3a59ab7d928b2946f.zip
dependencies: Upgrade to WebRender 0.64 (#31486)
This brings the version of WebRender used in Servo up-to-date with Gecko upstream. The big change here is that HiDPI is no longer handled via WebRender. Instead this happens via a scale applied to the root layer in the compositor. In addition to this change, various changes are made to Servo to adapt to the new WebRender API. Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Diffstat (limited to 'components/gfx/platform/macos')
-rw-r--r--components/gfx/platform/macos/font_template.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/components/gfx/platform/macos/font_template.rs b/components/gfx/platform/macos/font_template.rs
index a770996a81a..8320a358622 100644
--- a/components/gfx/platform/macos/font_template.rs
+++ b/components/gfx/platform/macos/font_template.rs
@@ -125,8 +125,14 @@ impl FontTemplateData {
/// Returns the native font that underlies this font template, if applicable.
pub fn native_font(&self) -> Option<NativeFontHandle> {
- self.ctfont(0.0)
- .map(|ctfont| NativeFontHandle(ctfont.copy_to_CGFont()))
+ let local_identifier = match &self.identifier {
+ FontIdentifier::Local(local_identifier) => local_identifier,
+ FontIdentifier::Web(_) => return None,
+ };
+ Some(NativeFontHandle {
+ name: local_identifier.postscript_name.to_string(),
+ path: local_identifier.path.to_string(),
+ })
}
}