Menu

#569 Improve fonts search and add fallback lists

v1.0_(example)
closed-invalid
None
5
2018-11-22
2018-07-10
freshlydog
No

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.

Discussion

  • freshlydog

    freshlydog - 2018-07-10

    <svg width="222pt" height="222pt"> <text y="22">test</text> </svg>

    gm convert test.svg test.png
    gm.exe convert: Unable to read font (n019003l.pfb) [No such file or directory].

    And ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/snapshots/ don't works

     

    Last edit: freshlydog 2018-07-10
  • Bob Friesenhahn

    Bob Friesenhahn - 2018-07-10

    On Tue, 10 Jul 2018, freshlydog wrote:

    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 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 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.

    I will fix the link.

    Bob

     
  • freshlydog

    freshlydog - 2018-07-10

    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.

     
    • Bob Friesenhahn

      Bob Friesenhahn - 2018-07-10

      On Tue, 10 Jul 2018, freshlydog wrote:

      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.

      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

       
  • Bob Friesenhahn

    Bob Friesenhahn - 2018-11-22
    • status: open --> closed-invalid
    • assigned_to: Bob Friesenhahn
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2018-11-22

    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.

     

Log in to post a comment.

MongoDB Logo MongoDB