Closed KitsuneAlex closed 3 months ago
I haven't looked at the code, but a C API would be nice.
I haven't looked at the code, but a C API would be nice.
Any specific features you need/expect from a C-API beyond the core capabilities? ^^ Might as well add them while i'm at it if you have any suggestions.
Looks good!
We have been looking for a C API fork for a long time, implementation would be great. The code is clean.
Looks clean :)
There is a rough, but working implementation draft for LWJGL now which is based on this PR.
I think i'm quite happy with how this looks now @Chlumsky :)
Not sure about the header/source files names tbh, i think you might prefer msdfgen-c
over msdfgen_c
judging by your other files 😄
Messed up title of the last commit but you might wanna squash anyways if you want to merge.
Gonna leave this as-is for now until you have time to take a look. But i found another inconsistency in my API draft i might wanna address.
I removed the allocator API for now as it would require a larger refactor to implement properly throughout the codeebasee. I also added support for the FreeType font import API with a fitting msdfgen-ext-c.h
:) Just needs some documentation.
Tested implementation in LWJGL using a custom runtime loader. Works like a charm.
Sorry, but if I merged this, I would have to support it for eternity, even though I don't use it, so I think it will be better if you keep it updated in your own fork.
No hard feelings, i'll keep maintaining a fork. Just thought you might wanna add it to your own project.
As the title suggests, i went ahead and implemented a C-API wrapper for msdfgen-core and the FreeType extensions. Originally this wrapper was supposed to be a part of my upcoming LWJGL PR for adding msdfgen bindings, but i thought the project itself could maybe use it even better :)
UPDATE: Another thing i implemented out of personnal necessity is a runtime loader for FreeType which doesn't require linking msdfgen against it statically and offers an API to set a custom function load callback.
Also adds a reasonable default configuration for clang-format
and clang-tidy, so IDEs like CLion don't permanently mess up the code formatting.I am open for any improvement suggestions or nitpicks. Cheers.