Skip to content
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

Fallback mechanism for the fonts #683

Closed
dlapanik opened this issue Jun 8, 2017 · 3 comments
Closed

Fallback mechanism for the fonts #683

dlapanik opened this issue Jun 8, 2017 · 3 comments

Comments

@dlapanik
Copy link

dlapanik commented Jun 8, 2017

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.

@gubikmic
Copy link

Is there any update on this? I'm facing the same issue.

@dlapanik
Copy link
Author

nope :(

@liborm85
Copy link
Collaborator

duplicate: #201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants