Closed javfres closed 2 years ago
I think this probably is related to 18 so we'll address related to that ticket.
FYI, the version of the Cpdf library in use right now doesn't support font subsetting. I'm thinking we'll unify the Cpdf library (also used by Dompdf) into it's own project and add as a dependency. Supporting font subsetting will require a further dependency on php-font-lib. Until font subsetting support is available you can create your own subsets using php-font-lib (if it's important to your project).
I am trying to generate a pdf with dompdf that contains a svg with custom fonts and I was unable to do it. I had to do a fork of the repository with a hack. I suppose this is related with #18.
I think that the
SurfaceCpdf@setFont
method is calling$this->canvas->selectFont
without the full path of the font directory. I end up replacing that method with something similar as:This sets the actual font but things like font subsetting doesn't work.