-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom fonts + variable fonts #4
Comments
The simplest implementation I can think of is an array of Tasks that is awaited on via Promise.all before every Paint execution. A task is a promise that resolves when the object is ready to use: A font is loaded into the document, a protosprites sheet has been baked into a canvas, etc. TODO: figure out what to do when tasks fail/reject. A font or sprite sheet failing to load shouldn't blow up the entire map, or should it? |
Map loading will still succeed if individual tasks ,like fonts or sprites, fail to load; how those are handled in failure case is up to the specific task |
Helper for FontFace API to block drawing until font is loaded
The text was updated successfully, but these errors were encountered: