WICG / canvas-formatted-text

Other
80 stars 17 forks source link

Supplying fonts for WebGL use-case #28

Open yjbanov opened 2 years ago

yjbanov commented 2 years ago

When rendering to WebGL, fallback fonts provided by the browser are not available. The application must provide its own fonts. Let's say the app starts with a set of Uint8Arrays containing TTF, perhaps downloaded using fetch():

yjbanov commented 2 years ago

How is the font chosen for a particular FormattedTextFragment communicated back to the application such that the application is able to render it?

Update: https://github.com/WICG/canvas-formatted-text/issues/29 answers this question.