-
-
Notifications
You must be signed in to change notification settings - Fork 982
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
Add command to convert fonts #820
base: master
Are you sure you want to change the base?
Conversation
allow for config cache to be exported update readme
@happyDemon woah nice job! |
Thanks @jadamec for taking a look so swiftly! |
I spent the last few hours trying to get Japanese fonts working. I was about to give up when I tried this. Great job @happyDemon! |
Why is this pull request still not merged until now? |
Hy @happyDemon, i've used your command and it works smoothly. But I found that the command cannot work to generate multiple fonts. It will replace font that generated in the beginning at |
*/ | ||
public function handle() | ||
{ | ||
$dompdf = new Dompdf(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Dompdf instance must be taken from the service container.
- Then you won't need to manually set the option for
font_dir
. The service container itself will set all options fromconfig('dompdf.defines')
; - And in such a case, the
FontMetrics
class will be initialized with thefontDir
option in mind. And then the fonts will not be overwritten, as described here Add command to convert fonts #820 (comment)
Is this required? Isn't this done by dompdf itself on the fly? |
I thought it would be a good addition to the package to support font conversion.
The code is based on what dompdf ships in loadfont.php