mPDF addon very heavy because of fonts : optimisation possible?

I have a remark about the mPDF Writer library : this package is very heavy.
Have a look : 87Mbytes just for truetypes files inside this directory :

core/components/commerce_mpdfwriter/vendor/mpdf/mpdf/ttfonts

Some looks exotics and two of them are very heavy :

  • Sun-ExtA.ttf (22Mb)
  • Sun-ExtB.ttf (17Mb)

I’m not an expert and it should be a very good reason to have all of them.

And the transport vehicule is heavy too, of course (to install, to Gitify…)
So maybe it is the cost to have a free library for this job, but in my use case, the invoices are built correctly with only :

DejaVuSansCondensed-Bold.ttf
DejaVuSansCondensed.ttf
DejaVuSerifCondensed.ttf

Couldn’t be optimized ?

It doesn’t look like we can ignore the fonts from the installation (composer), but you can safely remove the ones you don’t need.