pub trait FontContextWebFontMethods {
// Required methods
fn add_all_web_fonts_from_stylesheet(
&self,
webview_id: WebViewId,
stylesheet: &DocumentStyleSheet,
guard: &SharedRwLockReadGuard<'_>,
device: &Device,
finished_callback: StylesheetWebFontLoadFinishedCallback,
document_context: &WebFontDocumentContext,
) -> usize;
fn load_web_font_for_script(
&self,
webview_id: Option<WebViewId>,
sources: SourceList,
descriptors: CSSFontFaceDescriptors,
finished_callback: Box<dyn FnOnce(LowercaseFontFamilyName, Option<FontTemplate>) + Send>,
document_context: &WebFontDocumentContext,
);
fn handle_web_font_request_failed(&self, url: ServoUrl);
}Required Methods§
fn add_all_web_fonts_from_stylesheet( &self, webview_id: WebViewId, stylesheet: &DocumentStyleSheet, guard: &SharedRwLockReadGuard<'_>, device: &Device, finished_callback: StylesheetWebFontLoadFinishedCallback, document_context: &WebFontDocumentContext, ) -> usize
fn load_web_font_for_script( &self, webview_id: Option<WebViewId>, sources: SourceList, descriptors: CSSFontFaceDescriptors, finished_callback: Box<dyn FnOnce(LowercaseFontFamilyName, Option<FontTemplate>) + Send>, document_context: &WebFontDocumentContext, )
fn handle_web_font_request_failed(&self, url: ServoUrl)
Implementations on Foreign Types§
Source§impl FontContextWebFontMethods for Arc<FontContext>
impl FontContextWebFontMethods for Arc<FontContext>
Source§fn handle_web_font_request_failed(&self, url: ServoUrl)
fn handle_web_font_request_failed(&self, url: ServoUrl)
Called when a single URL for a @font-face failed to load.