Skip to content
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

Browser fallback font information #93

Open
my2iu opened this issue Jun 22, 2022 · 1 comment
Open

Browser fallback font information #93

my2iu opened this issue Jun 22, 2022 · 1 comment

Comments

@my2iu
Copy link

my2iu commented Jun 22, 2022

It might be nice if the font API also exposed what fallback fonts the browser is using. So, if I need to render some sans-serif text, and it's missing some Chinese and Hindi characters shapes, Chrome knows how to fallback to other fonts for those characters. It would be great if I could query the browser for how it handles those fallbacks, so then I could emulate that behavior in JavaScript and substitute fonts in the same way for missing characters.

@inexorabletash
Copy link
Member

This sounds more like a DOM question, e.g. given a specific character in a text run, what actual font was used to render it.

Also potentially related to https://github.com/WICG/canvas-formatted-text ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants