You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I want to display all Chinese text as well.
I found out that normal Chinese text display well.
But some hard text that encoded with 4 bytes can not get a good display and overlayed by other word.
e.g. https://www.compart.com/en/unicode/U+24256
U+24256 "𤉖" display 'PV' in PDF.
To Reproduce
Steps to reproduce the behavior including code snippet (if applies):
And I think the main reason for the issue maybe:
(suppose c is a utf32(U+010000 - U+10FFFF) char)
c is composed by 2 bytes.
c.length() => 2
c.codePointAt() => only get the c[0].codePointAt() which has no mapped codepoint from fonts.
So, what i do is to:
correct the codepoint calculation for utf32 char.
fix the layout library to fix the font suggestion(before it's always restore to default font since not a valid codepoint).
fix the pdfkit to compute with correct glyphs and encoded text for utf32 char.
And finally the utf32 chars display normal in my pdf:
Describe the bug
I want to display all Chinese text as well.
I found out that normal Chinese text display well.
But some hard text that encoded with 4 bytes can not get a good display and overlayed by other word.
e.g.
https://www.compart.com/en/unicode/U+24256
U+24256 "𤉖" display 'PV' in PDF.
To Reproduce
Steps to reproduce the behavior including code snippet (if applies):
https://fonts.google.com/specimen/Cactus+Classical+Serif
which support the text '𤉖'
https://fonts.google.com/specimen/Chocolate+Classical+Sans?preview.text=%F0%A4%89%96
You can make use of react-pdf REPL to share the snippet
Expected behavior
I should see '𤉖' display correct in the PDF.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: