afdko icon indicating copy to clipboard operation
afdko copied to clipboard

[tx] Improvements to UFO handling

Open miguelsousa opened this issue 7 years ago • 8 comments

  • [x] Replace house-made XML parser (e.g. with libxml2)
  • [ ] Support converting between UFO versions
    • anchors
    • glyph colors
  • [ ] Change the current -ufo option to write v3 UFOs, or add a new -ufo3 option?
  • [ ] ... (to be continued)

miguelsousa avatar Jul 12 '18 01:07 miguelsousa

Perhaps use ufoLib?

benkiel avatar Jul 12 '18 01:07 benkiel

I have no idea. tx is C code.

miguelsousa avatar Jul 12 '18 02:07 miguelsousa

Ah, never mind...

benkiel avatar Jul 12 '18 03:07 benkiel

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.

anthrotype avatar Jul 12 '18 06:07 anthrotype

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.

frankrolf avatar Jul 12 '18 18:07 frankrolf

Not only for converting large fonts, but also for subroutinizing them.

kenlunde avatar Jul 12 '18 18:07 kenlunde

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.

khaledhosny avatar Jul 12 '18 18:07 khaledhosny

(https://github.com/linebender/norad is a WIP effort to make a UFO library in Rust for the WIP font editor Runebender)

madig avatar Dec 18 '19 21:12 madig