-
-
Notifications
You must be signed in to change notification settings - Fork 106
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 loading #11
Comments
Change the
Within your view, remove the
For some reason the name of the font only accepts lowercase... I hope it has been helpful, ah and do not forget to refresh the cache... In my example, just apply the font to the h1 tag.
|
Brilliant, did the trick. Had to move the letter spacing to my table class too to work otherwise this was ignored but fully working now. Thanks for the great package and quick response. |
best package for persian characters. after alot of hours finaly this package helped me. |
Hi
I have followed your docs and have the config file as below:
`<?php
return [
'mode' => 'utf-8',
'format' => 'A4',
'default_font_size' => '12',
'default_font' => 'sans-serif',
'margin_left' => 10,
'margin_right' => 10,
'margin_top' => 10,
'margin_bottom' => 10,
'margin_header' => 0,
'margin_footer' => 0,
'orientation' => 'P',
'title' => 'Laravel mPDF',
'author' => '',
'watermark' => '',
'show_watermark' => false,
'watermark_font' => 'sans-serif',
'display_mode' => 'fullpage',
'watermark_text_alpha' => 0.1,
'custom_font_dir' => base_path('resources/fonts/'), // don't forget the trailing slash!
'custom_font_data' => [
'Quantify' => [
'R' => 'Quantify.ttf' // regular font
]
]
];`
however the font does not display at all. Only the default san serif font.
Inline style in my pdf balde:
` @font-face {
font-family: 'Quantify';
}
body {
font-family: 'Quantify', sans-serif;
letter-spacing: 2px;
padding-right: 0 !important;
}`
Tried mapping to my standard fonts location in storage and tried moving that folder to resources as defined above. But no difference.
Currently developing on local homestead setup if this makes a difference?
Any help appreciated.
The text was updated successfully, but these errors were encountered: