aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/font.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-02-11 11:08:49 +0100
committerGitHub <noreply@github.com>2024-02-11 10:08:49 +0000
commitcdc3c369f0bbc338c20df5b50ecaa9b6781aea65 (patch)
tree1a6f418ce654dfb5e2475b264ea90eb0c9ada78a /components/gfx/font.rs
parent410ead20b074597349ce65e3d7f77682bcf938f9 (diff)
downloadservo-cdc3c369f0bbc338c20df5b50ecaa9b6781aea65.tar.gz
servo-cdc3c369f0bbc338c20df5b50ecaa9b6781aea65.zip
layout: Implement support for font fallback (#31254)
This adds an initial implementation of font fallback, on part with the one used in legacy layout. There are still issues. For instance, font matching is done per unicode character rather than based on graphemes or the shape first approach of Chrome. The idea is that these changes can be made later.
Diffstat (limited to 'components/gfx/font.rs')
-rw-r--r--components/gfx/font.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/gfx/font.rs b/components/gfx/font.rs
index 77e27158826..5bce57528f5 100644
--- a/components/gfx/font.rs
+++ b/components/gfx/font.rs
@@ -106,7 +106,7 @@ pub trait FontTableMethods {
fn buffer(&self) -> &[u8];
}
-#[derive(Clone, Debug, Deserialize, Serialize)]
+#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
pub struct FontMetrics {
pub underline_size: Au,
pub underline_offset: Au,