Replies: 1 comment
-
|
I just wanted to add that I was able to perform subsetting of CFF based fonts, with glyph width rewriting. It's remarkable how many things AFDKO can be used for, and the more I use it the more I appreciate it! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I recently integrated some afdko
txfragments into PoDoFo PDF manipulation library to implement an on-demand Type1 to CFF conversion. While I was successful in the task, and I take the opportunity to thank Adobe engineers for this hidden gem, I struggled a bit integrating the code into an external user library, which understandably it may not be the first intended target for code inclusion. While working I collected some ideas that could improve the code re-usability, which I wanted to report here. I'm not asking to implement any of the following ideas, because some would clearly require huge code refactor which I can't expect you to prioritize on unless there are valid agreed reasons. Some are small enough that could be implemented right away, though. The list:txabstract context that generically allows to create file/stream types, so that any shared module (eg.t1read,cffwrite...) can require a specific stream without supplying a name/identifier. This is maybe the most complex suggestion, I'm not expecting it will be ever implemented;size_t, as negative offsets are ignored anyway as shown in stm_seek. This change could be made right away, and in general it's good to drop usage oflongtype in portable code, as it's scaling 32-64 bit in non MSVC/non MinGW and non scaling in MSCV (which is a confusing behavior);txabstract context), which is probably a big work but would generally improve quality/readability of the afdko code, IMO;In conclusion I am adding one more unsolicited recommendation: I noticed some repeating fragments of code which I'm sure you are well aware of. Of course they have micro differences/different error codes but factorizing them with some shared methods and/or macros would generally improve the code quality.
Beta Was this translation helpful? Give feedback.
All reactions