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

Support adding custom fonts to DW2PDF including the extra configuration needed for mpdf library #445

Open
nd1976 opened this issue Nov 15, 2021 · 5 comments

Comments

@nd1976
Copy link

nd1976 commented Nov 15, 2021

How Can I change the font family to use the CI one and not the created "DejaVu Sans Condensed"

I tried it with a template in the tpl folder and I wrote in the Fontface in the CSS file. But it does not change anything.

@Klap-in
Copy link
Collaborator

Klap-in commented Oct 8, 2022

Extra fonts should be also configured in the mpdf library, this should be done in the DokuPDF.class.php or action.php.
See https://mpdf.github.io/fonts-languages/fonts-in-mpdf-7-x.html

Proposals welcome as pull request.

@Klap-in Klap-in changed the title CI Font to DW2PDF CI Font to DW2PDF needs extra config set for mpdf library Oct 8, 2022
@Klap-in
Copy link
Collaborator

Klap-in commented Oct 12, 2022

Similar as #402

@Klap-in Klap-in changed the title CI Font to DW2PDF needs extra config set for mpdf library Support adding custom fonts to DW2PDF including the extra configuration needed for mpdf library Oct 12, 2022
@Klap-in
Copy link
Collaborator

Klap-in commented Oct 12, 2022

Example for the fontawesome font: https://stackoverflow.com/a/58702825/1043588

I'm wondering what is practical manner to implement. Add a default font folder for extra fonts to the dw2pdf folder, and let in the config add the names of the fonts to configure? Probably just looping over the names is not nuanced enough.
Define a e.g. font.php file in the pdf-template folder that add the right fonts? With enough examples in the manual?

@mstumberger
Copy link

mstumberger commented Feb 18, 2024

@Klap-in thanks for the tip, I'we tried this but got an arror saying that font is not supported...
I used this font:
https://www.cdnpkg.com/line-awesome/file/fa-solid-900.ttf/
image

image

@Klap-in
Copy link
Collaborator

Klap-in commented Feb 18, 2024

I have no time to help you debugging, sorry. Further no suggestions yet.

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

No branches or pull requests

3 participants