diff options
Diffstat (limited to 'components/shared/webrender/lib.rs')
-rw-r--r-- | components/shared/webrender/lib.rs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/components/shared/webrender/lib.rs b/components/shared/webrender/lib.rs index a71f9f67760..8af3a17b609 100644 --- a/components/shared/webrender/lib.rs +++ b/components/shared/webrender/lib.rs @@ -9,7 +9,10 @@ use std::sync::{Arc, Mutex}; use euclid::default::Size2D; use webrender_api::units::TexelRect; -use webrender_api::{ExternalImage, ExternalImageHandler, ExternalImageId, ExternalImageSource}; +use webrender_api::{ + ExternalImage, ExternalImageHandler, ExternalImageId, ExternalImageSource, FontInstanceFlags, + FontInstanceKey, FontKey, NativeFontHandle, +}; /// This trait is used as a bridge between the different GL clients /// in Servo that handles WebRender ExternalImages and the WebRender @@ -164,3 +167,14 @@ impl ExternalImageHandler for WebrenderExternalImageHandlers { }; } } + +pub trait WebRenderFontApi { + fn add_font_instance( + &self, + font_key: FontKey, + size: f32, + flags: FontInstanceFlags, + ) -> FontInstanceKey; + fn add_font(&self, data: Arc<Vec<u8>>, index: u32) -> FontKey; + fn add_system_font(&self, handle: NativeFontHandle) -> FontKey; +} |