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

Custom font not working #84

Closed
agares29 opened this issue Mar 30, 2022 · 3 comments
Closed

Custom font not working #84

agares29 opened this issue Mar 30, 2022 · 3 comments

Comments

@agares29
Copy link

I'm trying to add a custom font, but it's not working.
I've already tried all the solutions from previous issues but neither of them works for me. I don't see what I'm missing

I already create the config/pdf.php file:

pdf

Added the fonts to the project, in this case I use the public folder, also tried to put them on resources folder, but not working:

fonts

And this is how I'm setting the font on the blade file:

code

@tek2991
Copy link

tek2991 commented May 21, 2022

Any update on this?

@agares29
Copy link
Author

agares29 commented May 21, 2022

@tek2991, unfortunately not, I changed to this library "niklasravnsborg/laravel-pdf", it worked great and the changes to the code where insignificant.

Hope it helps :)

@mccarlosen
Copy link
Owner

Hi guys,

This is my config in pdf.php file and I don't have any problem. Follow these tips:

  • Write filename in CamelCase.
  • The name must be the same as the font name.
  • The font type must follow the name. Example: Roboto-Regular, Roboto-Italic, Roboto-Bold.

image

image

image

@mccarlosen mccarlosen mentioned this issue Jun 1, 2022
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