font-manager icon indicating copy to clipboard operation
font-manager copied to clipboard

Default font loaded does not populate links & more from getActiveFont()

Open bjorngyles opened this issue 5 years ago • 2 comments
trafficstars

For my project I need to fetch the font file / link from the active font and pass it along to a database after I click submit. But the default loaded font only shows family and id for the font. You can see the image below where I fetched activefont for the default font and after the information from a font selected afterwards.

Is there an easier way to do this, or a way to add this information for the default font as well?

image

font-picker is golden btw!

Regards Bjørn

bjorngyles avatar Apr 28 '20 21:04 bjorngyles

Thanks for opening the issue!

This information isn't available when the font picker is initialized, it's provided by Google Fonts. The Font Manager could be modified so once the font list has been fetched, the additional information is added to the default font.

samuelmeuli avatar Apr 29 '20 08:04 samuelmeuli

@samuelmeuli Can you make it a default behaviour? Font manager is a good package, but some design decisions make it impossible to extend.

There's no way to load all variants of a font, and removing details from active font prevents from implementing more robust behaviour for font management

mrkaluzny avatar Oct 02 '20 14:10 mrkaluzny