-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Missing glyphs causing rendering to blow up instead of using a default #377
Comments
Update: I tried resolving this by specifying multiple font families in the style declaration:
but am getting a new and interesting error:
|
Seems you have |
Hey.
Please consider opening an issue for the first point, and also one for providing several font-families. But if you don't mind I'll close this one because it's not a real issue |
OS: MacOS
React-pdf version: 1.0.0-alpha.25
Description: Rendering blows up if text is passed in containing glyphs that are not in the font provided. Potential solutions:
unicode-range
to be passed toFont.register
similar to what’s possible with@font-face
on the web — as that link says, it would allow the user to register a separate font file for each Unicode language subset (e.g. Latin, Greek, Hindi, ...) and react-pdf would only download the file if it were needed to render the glyphs on the page.How to replicate issue including code snippet (if applies): Passing glyphs outside the subset in the WOFF font we’re using results in the following error (very similar to the one in #284, but I think the cause is different):
We have identified that only a small subset of glyphs is causing this error, mostly Greek glyphs used in mathematical/scientific prose and formulae.
For sure, subsetting our font differently to include the missing glyphs is an option, but we’d like to find a solution that’s more resilient to random content from unexpected character sets.
Where would be the best place to start with a PR to fix this?
The text was updated successfully, but these errors were encountered: