vizia::vg::resourcesTrait ResourceProvider
pub trait ResourceProvider {
// Required methods
fn load(
&self,
resource_path: &str,
resource_name: &str,
) -> Option<RCHandle<SkData>>;
fn load_typeface(
&self,
name: &str,
url: &str,
) -> Option<RCHandle<SkTypeface>>;
fn font_mgr(&self) -> RCHandle<SkFontMgr>;
// Provided method
fn load_image_asset(
&self,
resource_path: &str,
resource_name: &str,
_resource_id: &str,
) -> Option<RCHandle<skresources_ImageAsset>> { ... }
}
This is used in the SVG Dom and should be used for ipmlementing load_typeface().