pub struct GoogleFonts { /* private fields */ }Implementations§
Source§impl GoogleFonts
impl GoogleFonts
pub fn new(p: PathBuf, family_filter: Option<Regex>) -> Self
pub fn tag_metadata(&self) -> Result<&[TagMetadata], &Error>
pub fn families(&self) -> &[(PathBuf, Result<FamilyProto, ParseError>)]
pub fn languages(&self) -> &[Result<LanguageProto, ParseError>]
pub fn language(&self, lang_id: &str) -> Option<&LanguageProto>
pub fn family(&self, font: &FontProto) -> Option<(&Path, &FamilyProto)>
pub fn find_font_binary(&self, font: &FontProto) -> Option<PathBuf>
Sourcepub fn primary_language(&self, family: &FamilyProto) -> &LanguageProto
pub fn primary_language(&self, family: &FamilyProto) -> &LanguageProto
Our best guess at the primary language for this family
Meant to be a good choice for things like rendering a sample string
Auto Trait Implementations§
impl !Freeze for GoogleFonts
impl !RefUnwindSafe for GoogleFonts
impl Send for GoogleFonts
impl !Sync for GoogleFonts
impl Unpin for GoogleFonts
impl !UnwindSafe for GoogleFonts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more