laravel-dompdf
laravel-dompdf copied to clipboard
Add command to convert fonts
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
font:convert
{fontFamily : the name of the fonts, e.g. Verdana, \'Times New Roman\', monospace, sans-serif. If it equals to "system_fonts", all the system fonts will be installed.}
{fileName : the .ttf or .otf file for the normal, non-bold, non-italic face of the fonts.}
{--b|bold= : Bold fonts face specific file}
{--i|italic= : Italic fonts face specific file}
{--bi|bold-italic=} : Bold italic fonts face specific file
@happyDemon woah nice job! @barryvdh this looks very useful, do you have time to approve&merge?
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 dompdf_font_family_cache.php
Is this required? Isn't this done by dompdf itself on the fly?