Open
Description
I'm trying to remove a bunch of font families, Hind Siliguri, Hind Madurai, Mukta, Noto Sans HK, Noto Sans JP, and more.
Are there any examples I can remove them onload?
I can use removeFont
onChange, but not onload.
Also adding the removeFont
method to the onChange
callback, it fires errors when I select a font since it is already removed.
const fontPicker = new FontPicker(
"My-API-Key", // Google API key
"Open Sans", // Default font
{ limit: 100 }, // Additional options
()=>{
const fontsToRemove =['Hind Siliguri', 'Hind Madurai','Mukta','Noto Sans HK','Noto Sans JP','Noto Sans KR','Noto Sans SC','Noto Sans TC','Noto Serif JP','Assistant','Mulish','Padauk', 'Cormorant Garamond']
fontsToRemove.forEach(font => {
fontPicker.removeFont(font)
});
}
);
Metadata
Metadata
Assignees
Labels
No labels