-
-
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
patch: force render standard fonts #2827
base: master
Are you sure you want to change the base?
patch: force render standard fonts #2827
Conversation
|
Will this also fix custom fonts loaded via |
@theskillwithin i never experienced issues with |
@mrjeanp For some reason the Font.register only works with external fonts. (I am using the words internal and external here to mean local path or external url path) as soon as i try to use an internal font path by module loading or pointing to relative path oddly if I point to the same font like: using Remix (loaded via vite) |
Taken from https://react-pdf.org/fonts#register Try using an absolute path, maybe use something like |
This is a follow up fix to my issue #2818
Problem:
When styling
<Text/>
with standardfontFamily
such font doesn't render and instead it falls back toHelvetica
which is the currently configured default font.Fix:
I copied the following code and included a condition inside
pickFontFromFontStack
to force selecting the font that the user actually picked.Please review @diegomura 🙏