Comments (4)
Change the custom_font_data
settings to this:
'custom_font_data' => [
'quantify' => [
'R' => 'Quantify.ttf' // regular font
]
],
Within your view, remove the @font-face
and change your font-family
by this:
body {
font-family: 'quantify', sans-serif;
letter-spacing: 2px;
padding-right: 0 !important;
}
For some reason the name of the font only accepts lowercase...'quantify' => [
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.
body h1 {
font-family: 'quantify', sans-serif;
}
from laravel-mpdf.
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.
from laravel-mpdf.
best package for persian characters. after alot of hours finaly this package helped me.
an note for arabic and persain fonts. if your characteres are seperately and not conneted use below config:
from laravel-mpdf.
I am having the similar issue where the custom fonts are not picked up.
config:
load view:
$pdf = PDF::loadView('emails.test.view',['data' => $this->data]);
Result: defaults to dejavu font
from laravel-mpdf.
Related Issues (20)
- Styling The Generated PDF HOT 5
- get download url HOT 1
- how to change watermark color? HOT 2
- Laravel 10 - When ? HOT 5
- transform: rotate(90deg) not working in css style
- Watermark on only last page
- PHPStan problem in LaravelMpdf.php
- Spot Color HOT 2
- How to multiple language - multilingual HOT 1
- mPDF requirement needs to be updated to 8.1.6 HOT 1
- Undefined array key "s"
- Qr code xmL problem HOT 1
- how to style with tailwind? HOT 1
- Use template on first page
- Laravel-MPDF Doesn't show italic farsi/arabic text HOT 1
- Package not working with livewire.
- Password and permission
- Sinhala/unicode font renderring issue
- Undefined array key "s" error
- Error with laravel-mpdf HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-mpdf.