Trait webrender_traits::WebRenderFontApi

source ·
pub trait WebRenderFontApi {
    // Required methods
    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;
    fn forward_add_font_message(
        &self,
        bytes_receiver: IpcBytesReceiver,
        font_index: u32,
        result_sender: IpcSender<FontKey>,
    );
    fn forward_add_font_instance_message(
        &self,
        font_key: FontKey,
        size: f32,
        flags: FontInstanceFlags,
        result_receiver: IpcSender<FontInstanceKey>,
    );
}

Required Methods§

source

fn add_font_instance( &self, font_key: FontKey, size: f32, flags: FontInstanceFlags, ) -> FontInstanceKey

source

fn add_font(&self, data: Arc<Vec<u8>>, index: u32) -> FontKey

source

fn add_system_font(&self, handle: NativeFontHandle) -> FontKey

source

fn forward_add_font_message( &self, bytes_receiver: IpcBytesReceiver, font_index: u32, result_sender: IpcSender<FontKey>, )

Forward a AddFont message, sending it on to the compositor. This is used to get WebRender FontKeys for web fonts in the per-layout FontContext.

source

fn forward_add_font_instance_message( &self, font_key: FontKey, size: f32, flags: FontInstanceFlags, result_receiver: IpcSender<FontInstanceKey>, )

Forward a AddFontInstance message, sending it on to the compositor. This is used to get WebRender FontInstanceKeys for web fonts in the per-layout FontContext.

Implementors§