@MatthewBlanchard had a good idea: supporting nib stroking in MFEKglif.
But, that can't happen without some changes, because MFEKstroke is a top-level module. It can't be included in MFEKglif.
src/nib_stroke/fontforge.rs needs to be moved to MFEK/math.rlib. The conditional compilation option will stay, but it will just decide whether or not MFEK/math.rlib should pull in FontForge (libfontforge.so / libfontforge.dll) via a feature tag.
So, it returns us back an Option<String> representing .glif data. Which we then write if it's of variant Some(glifxml). It should actually return a Result<Glif, NibStrokeError>. That would make MFEKstroke responsible for calling glifparser::write.
This way, it can be used from MFEKglif and MFEKstroke, just like CWS and PAP.
This is my fault, so I ought to be the one to fix it. Let's say it was a failure of imagination on my part to not think that this would be callable from MFEKglif. What was I thinking? :-)
@MatthewBlanchard had a good idea: supporting nib stroking in MFEKglif.
But, that can't happen without some changes, because MFEKstroke is a top-level module. It can't be included in MFEKglif.
src/nib_stroke/fontforge.rs
needs to be moved toMFEK/math.rlib
. The conditional compilation option will stay, but it will just decide whether or notMFEK/math.rlib
should pull in FontForge (libfontforge.so
/libfontforge.dll
) via a feature tag.The API also needs to change...
This function right now assumes a CLI API:
https://github.com/MFEK/stroke/blob/6c9db1bde4c0875ec22747c8ec67312d87db510a/src/nib_stroke/fontforge.rs#L250
So, it returns us back an
Option<String>
representing .glif data. Which we then write if it's of variantSome(glifxml)
. It should actually return aResult<Glif, NibStrokeError>
. That would make MFEKstroke responsible for callingglifparser::write
.This way, it can be used from MFEKglif and MFEKstroke, just like CWS and PAP.
This is my fault, so I ought to be the one to fix it. Let's say it was a failure of imagination on my part to not think that this would be callable from MFEKglif. What was I thinking? :-)