Improve fonts search and add fallback lists
Swiss army knife of image processing
Brought to you by:
bfriesen
64-bit GM can't find 32-bit GS path in registry because it's inside Wow6432Node: "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\GPL Ghostscript\8.61".
I tried set evironment variable GHOSTSCRIPT_FONT_DIR (googled it), but GM ignores it.
I tried copy contents of fonts dir into GM (where lies gm.exe) and GM\fonts - also don't works.
Will be nice to have fallback lists (serif, sans-serif, monospace) and use first found font if all fallbacks fails.
Also www\bugs.html have wrong link to bugtracker.
<svg width="222pt" height="222pt"> <text y="22">test</text> </svg>And ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/snapshots/ don't works
Last edit: freshlydog 2018-07-10
On Tue, 10 Jul 2018, freshlydog wrote:
I think that this is because you are using a 32-bit application on a
64-bit Windows. Even if the fonts were found, the Ghostscript
installed there would not be usable if it is not the same bits (32/64)
as GraphicsMagick. If you install a Ghostscript matching the
GraphicsMagick build and then it should work.
Is there a reason why you want to use a different architecture than
the native OS?
I will fix the link.
Bob
I thought GM uses only fonts so i just installed old distributive.
I copied GS_LIB from "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\GPL Ghostscript\8.61" to "HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript\8.61" - that worked.
On Tue, 10 Jul 2018, freshlydog wrote:
GM uses Ghostscript for Postscript and PDF rendering if it finds it.
Under Windows, it loads Ghostscript as a loadable DLL module so the
Ghostscript it finds needs to be binary compatible.
Bob
GM searches for Ghostscript in the registry and Ghostscript must be compatible (32/64 bit) with GraphicsMagick. Then once it finds Ghostcript installation location, it uses fonts that it finds there. While the fonts situation can be considerably improved, I don't consider this behavior to be a bug.