afdko
afdko copied to clipboard
[tx] Improvements to UFO handling
- [x] Replace house-made XML parser (e.g. with libxml2)
- [ ] Support converting between UFO versions
- anchors
- glyph colors
- [ ] Change the current
-ufooption to write v3 UFOs, or add a new-ufo3option? - [ ] ... (to be continued)
Perhaps use ufoLib?
I have no idea. tx is C code.
Ah, never mind...
Cython can be used to go the other way around as well and export a C API from a cython module, so that other C programs can call functions defined in python (via cython). http://cython.readthedocs.io/en/latest/src/userguide/external_C_code.html#c-api-declarations
It’s doable.
Let’s keep in mind that tx is quite fast at converting files, our CJK fonts rely on it quite heavily (correct me if I’m wrong, @kenlunde). It would be a shame to give up the speed benefit.
Not only for converting large fonts, but also for subroutinizing them.
I think it is rather useful to have another UFO implementation, especially in a language like C which allows it to be used in more places than a pure Python implementation. It might be even a good idea to turn in into an independent library for better re-use, if it isn’t already the case.
(https://github.com/linebender/norad is a WIP effort to make a UFO library in Rust for the WIP font editor Runebender)