Skip to main content

resolve_font_entry

Function resolve_font_entry 

Source
pub fn resolve_font_entry(entry: &FontEntry) -> Result<Vec<PathBuf>>
Expand description

Validate a FontEntry and resolve it to a list of TTF file paths.

  • Local entry (path set, source absent): returns [path] as-is.
  • Google Fonts entry (source = "google", path absent): downloads (or reads from cache) and returns one path per requested weight.
  • Conflict (source and path both set): returns an error.
  • Neither (path absent and source absent): returns an error.