We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
When trying to load an SVG resource, I encounter an error saying that msdfgen.exe could not be found. This seems to originate from this line: https://github.com/HeapsIO/heaps/blob/master/hxd/fs/Convert.hx#L404
msdfgen.exe
command("msdfgen.exe", ["-svg", srcPath, "-size", '$size', '$size', "-autoframe", "-o", dstPath]);
To account for Linux systems, something like this could be considered.
class ConvertSVGToMSDF extends Convert { override function convert() { var size = hasParam("size") ? getParam("size") : 128; switch(Sys.systemName()){ case "Windows": command("msdfgen.exe", ["-svg", srcPath, "-size", '$size', '$size', "-autoframe", "-o", dstPath]); case "Linux": command("inkscape", [srcPath, "-o", dstPath]); default: throw("No SVG to PNG converter specified."); } } static var _ = Convert.register(new ConvertSVGToMSDF("svg", "png")); }
This is sufficient for my use-case but doesn't take size into account, and does throw an access violation from Hashlink.
The text was updated successfully, but these errors were encountered:
The access violation was a VSHaxe issue and is now not occurring.
The suggested code works well on systems with Inkscape installed.
Sorry, something went wrong.
No branches or pull requests
Hello,
When trying to load an SVG resource, I encounter an error saying that
msdfgen.exe
could not be found.This seems to originate from this line:
https://github.com/HeapsIO/heaps/blob/master/hxd/fs/Convert.hx#L404
To account for Linux systems, something like this could be considered.
This is sufficient for my use-case but doesn't take size into account, and does throw an access violation from Hashlink.
The text was updated successfully, but these errors were encountered: