Supported Font types (.woff/ woff2 ??) #2073
Unanswered
contentkonker
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What are font types other than .ttf which works with the react-pdf/renderer?
The documentation doesn't provide any information on supported font types.
I want to use woff2 (or atleast woff) for my use case but they are not working. I'm trying to render non-latin fonts and the .ttf files are HUGE (>9MB) for each variant (by variant, I mean regular, bold, italic, etc.). So if I want to load 1 font family of 4-5 variations usng .ttf files, it is like 40-50MB!! This is too much data and will be a bad user experience (especially for the users whoo have low speed internet connections).
The best part of woff2 fonts is they are small in size and loads quicker than .ttf fonts.
So is there any way we can use woff2 fonts for non-latin fonts (eg. Japanese)?
Note: I have already gone through this issue, where the author has pushed a commit to support woff2 fonts and closed the ticket, but there is no clear example on how to implement woff2 fonts (if at all it works)
Beta Was this translation helpful? Give feedback.
All reactions