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

Declaring a font-stack? #170

Open
michihuber opened this issue Apr 14, 2019 · 3 comments
Open

Declaring a font-stack? #170

michihuber opened this issue Apr 14, 2019 · 3 comments

Comments

@michihuber
Copy link
Contributor

Is it possible to use a custom ttf-font but define a fallback to system fonts?
My custom font doesn’t include chinese glyphs, but I’d like those to be rendered through the user’s system font.

@yogthos
Copy link
Collaborator

yogthos commented Apr 14, 2019

Unfortunately, that's not something that's supported at the moment. You can specify custom fonts for individual paragraphs however.

@michihuber
Copy link
Contributor Author

is that limitation in clj-pdf or openpdf? would like to give this a shot if it's possible to add (pointers appreciated).

@yogthos
Copy link
Collaborator

yogthos commented May 15, 2020

I suspect it's likely a clj-pdf limitation as opposed to openpdf. I haven't looked if there is an option for doing that, but I'd start checking for that. If that's possible, then you'd be able to add it to the config map and set it in the setup-doc function when the document is being set up.

If openpdf doesn't provide a way to set this globally, then it may be possible to pass it around in the config, and then check for it in each element that renders text to set it. I'd like to avoid this approach if possible as it's going to be fragile to maintain.

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

2 participants