diegomura / react-pdf

📄 Create PDF files using React
https://react-pdf.org
MIT License
14.63k stars 1.16k forks source link

Font not rendering special characters #1771

Open AleksaVuic opened 2 years ago

AleksaVuic commented 2 years ago

So in my app i have multiple language options (English/Chinese/Japanese/etc). Im using "lato", sans-serif font fallback for Chinese/Japanese and some other language special characters and it renders fine.

import LatoRegular from '@/.../.../Lato-Regular.ttf'

Font.register({
  family: 'LatoRegular',
  format: 'truetype',
  src: LatoRegular
})

So lato doesn't work for all the characters. Since font fallback is not possible in this library (correct me if I'm wrong?), is there a font that supports all, latin special characters, Chinese and Japanese at the same time? I already read the posts here and 'Zboom' font (or whats it called?) doesn't fit for me, it looks ugly when rendering latin chars.

Any workaround for this would be appreciated. Thank you

anhcnt197vn commented 2 years ago

I have the same issue!

helio-durable commented 2 years ago

Same bug here trying to render a star ★