aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx_traits/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/gfx_traits/lib.rs')
-rw-r--r--components/gfx_traits/lib.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/components/gfx_traits/lib.rs b/components/gfx_traits/lib.rs
index 165059c7996..447be6e5dc2 100644
--- a/components/gfx_traits/lib.rs
+++ b/components/gfx_traits/lib.rs
@@ -103,3 +103,17 @@ pub fn node_id_from_scroll_id(id: usize) -> Option<usize> {
}
None
}
+
+pub enum FontData {
+ Raw(Vec<u8>),
+ Native(webrender_api::NativeFontHandle),
+}
+
+pub trait WebrenderApi {
+ fn add_font_instance(
+ &self,
+ font_key: webrender_api::FontKey,
+ size: app_units::Au,
+ ) -> webrender_api::FontInstanceKey;
+ fn add_font(&self, data: FontData) -> webrender_api::FontKey;
+}