Skip to main content

FontContextWebFontMethods

Trait FontContextWebFontMethods 

Source
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§

Source

fn add_all_web_fonts_from_stylesheet( &self, webview_id: WebViewId, stylesheet: &DocumentStyleSheet, guard: &SharedRwLockReadGuard<'_>, device: &Device, finished_callback: StylesheetWebFontLoadFinishedCallback, document_context: &WebFontDocumentContext, ) -> usize

Source

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, )

Source

fn handle_web_font_request_failed(&self, url: ServoUrl)

Implementations on Foreign Types§

Source§

impl FontContextWebFontMethods for Arc<FontContext>

Source§

fn handle_web_font_request_failed(&self, url: ServoUrl)

Called when a single URL for a @font-face failed to load.

Source§

fn add_all_web_fonts_from_stylesheet( &self, webview_id: WebViewId, stylesheet: &DocumentStyleSheet, guard: &SharedRwLockReadGuard<'_>, device: &Device, finished_callback: StylesheetWebFontLoadFinishedCallback, document_context: &WebFontDocumentContext, ) -> usize

Source§

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, )

Implementors§