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§
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
sourcefn forward_add_font_message(
&self,
bytes_receiver: IpcBytesReceiver,
font_index: u32,
result_sender: IpcSender<FontKey>,
)
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
FontKey
s for web fonts in the per-layout FontContext
.
sourcefn forward_add_font_instance_message(
&self,
font_key: FontKey,
size: f32,
flags: FontInstanceFlags,
result_receiver: IpcSender<FontInstanceKey>,
)
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 FontInstanceKey
s for web fonts in the per-layout FontContext
.