-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Would it be feasible to add some compatbility layer that allows programs compiled against the real libfontconfig to work with rust-fontconfig instead?
I'm guessing this isn't so straight-forward because rust-fontconfig wasn't created with the goal of being compatible and usable through a shim, so struct-layouts would be different, correct?
I stumbled over this project looking to reduce our dependencies when building Java-based images. Having had the same thoughts as you listed in the readme, I searched for a Rust-implementation of fontconfig and ended up here and saw that there's even some C-APIs.
The JVM uses a relatively small subset of libfontconfig functions and most types seem to be used as opaque types. :
FcPatternBuild
FcObjectSetBuild
FcFontList
FcStrDirname
FcNameParse
FcConfigSubstitute
FcDefaultSubstitute
FcFontMatch
FcGetVersion
FcFontSort
FcCharSetUnion
FcPatternAddString/FcPatternGetString/FcPatternGetBool/FcPatternGetInteger
FcPatternDestroy
FcObjectSetDestroy
FcFontSetDestroy
FcCharSetDestroy
Here is an example how they use it: