-
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
Related to this, we're currently implementing font auto-loading so users can call Font.load() without supplying raw font data.
Since the font backend may change over time, abstracting it behind a FontProvider interface decouples us from any specific external service.
The interface could also be opened up for users to supply custom providers in the future:
TVG.Font.setProvider({
fetch: async (name) => {
const res = await fetch(`/my-fonts/${name}.ttf`);
return { data: new Uint8Array(await res.arrayBuffer()), type: 'ttf' };
}
});
await TVG.Font.load('my-custom-font');Reactions are currently unavailable