laravel-dompdf icon indicating copy to clipboard operation
laravel-dompdf copied to clipboard

Add command to convert fonts

Open happyDemon opened this issue 2 years ago • 6 comments

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 avatar Oct 10 '21 08:10 happyDemon

@happyDemon woah nice job! @barryvdh this looks very useful, do you have time to approve&merge?

oneWaveAdrian avatar Nov 03 '21 18:11 oneWaveAdrian

Thanks @jadamec for taking a look so swiftly!

oneWaveAdrian avatar Nov 04 '21 13:11 oneWaveAdrian

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!

tyler36 avatar Nov 29 '21 06:11 tyler36

Why is this pull request still not merged until now?

iwandepe avatar Jun 12 '22 07:06 iwandepe

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

iwandepe avatar Jun 12 '22 08:06 iwandepe

Is this required? Isn't this done by dompdf itself on the fly?

barryvdh avatar Oct 02 '23 07:10 barryvdh