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
i need to render text in appropriate font. I have ttf files for each character sets and i can make pdfKit aware of them via doc.registerFont().
Problem is that text can contain any symbol - Latin, Cyrillic, Japanese, etc. And now before triggering doc.text() call i have to switch the font via doc.font(). And currently this is only possible by analyzing Unicode character range each symbol in text falls into. For example CJK unified ideographs range is something like '4e00 - 9faf', etc.
So question is: is it possible to put in place fallback logic for the fonts. Meaning that if character not found in one registered font proceed with other, and so on?
Thanks.
The text was updated successfully, but these errors were encountered:
Hello,
i need to render text in appropriate font. I have ttf files for each character sets and i can make pdfKit aware of them via doc.registerFont().
Problem is that text can contain any symbol - Latin, Cyrillic, Japanese, etc. And now before triggering doc.text() call i have to switch the font via doc.font(). And currently this is only possible by analyzing Unicode character range each symbol in text falls into. For example CJK unified ideographs range is something like '4e00 - 9faf', etc.
So question is: is it possible to put in place fallback logic for the fonts. Meaning that if character not found in one registered font proceed with other, and so on?
Thanks.
The text was updated successfully, but these errors were encountered: