Closed pgundlach closed 2 years ago
Subsetting is indeed a very desirable feature, but not implemented so far. It requires quite a lot of work, and I don't plan to work on it soon. Including a subsetter in this project involves two steps :
The former is rather simple but long and tedious. The later should be quicker (at least for a basic approach). I've started a prototype to automatically generate the code needed for the first step, but it is very much experimental...
(Just in case you are interested)
I have an OTF/TT subsetter at https://github.com/speedata/gootf - not bulletproof and not widely tested, but it works for the few fonts I have tested so far).
I am currently thinking of trying to put my code into the textlayout engine. Not sure if I will succeed or if this will improve anything, but I will report back if I have some kind of success.
Thank you very much for your answer and for the code online here at GitHub.
I'd like to use textlayout in a project of mine (https://github.com/speedata/boxesandglue) which is a library for PDF creation. For that I need font embedding and subsetting.
Currently I use my own code for that. Using my own code would require another step of interpreting the font code which is not strictly necessary, since the shaper already loads and interprets all kinds of tables in the OpenType / TrueType font.
Do you have subsetting / embedding code already somewhere in your projects (I see that you have a port of weasyprint) - or if not - do you have plans to add this code?
(please delete the question if not appropriate)