pub fn load_custom_font_family(
name: &str,
custom_paths: &[PathBuf],
) -> Result<FontFamily<FontData>, Error>Expand description
Attempts to load a font family from custom paths first, then falls back to system fonts. This function searches user-specified directories or files before looking in system fonts.
§Arguments
name- The font family name to search forcustom_paths- Custom directories or font files to search
§Returns
Ok(FontFamily<FontData>)if the font is found and loaded successfullyErr(Error)if the font cannot be found in any location
§Search order
- Custom paths (if provided) - searches for exact matches or files containing the name
- System fonts via fontdb
- Returns error if not found