Open khaledhosny opened 3 years ago
not sure if the Python API is supposed to be usable for outside users
well, yes, nanoemoji is primarily intended to be used as a command line tool, unlike picosvg which was designed to be both a CLI and a reusable library. Of course with python one can do whatever they please, but I would prefer to keep the python API for internal use, I believe it makes it easier to maintain and think about it. The command-line nature of nanoemoji is also evident in the way it internally makes uses of the ninja build tool to spawn a series of console entry points (all starting with python -m nanoemoji.*
) for accomplishing various tasks in parallel (which is also why it requires a build directory to store build.ninja and various intermediate files).
Nonetheless, I'm open to see if we could extend its CLI to accomplish what you are asking. Maybe we can add an option to to take an already existing UFO font to be updated with COLR info (instead of by default creating one from scratch).
I’m trying to use nanoemoji to build non-emoji COLRv1 fonts, but the CLI seems to written for Emoji fonts and I’m not sure if the Python API is supposed to be usable for outside users.
What I need is an API to take (picosvg-processed) SVG documents and return data that can be added to the already existing UFO font. It looks like the repository has all the pieces I need, but they are exposed as public API.