[Pkg-fonts-devel] Bug#952408: fontforge: no longer works in non-GUI environment

Julian Gilbey jdg at debian.org
Wed Mar 4 07:12:53 GMT 2020


tags 952408 patch
forwarded 952408 https://github.com/fontforge/fontforge/issues/4203
thanks

On Sun, Feb 23, 2020 at 09:28:55PM +0000, Julian Gilbey wrote:
> [...]
> Up until a relatively recent release of fontforge, if fontforge were
> run from a script without a GUI present, it would behave exactly like
> the non-GUI version.  But this release breaks this behaviour: even
> running 'fontforge --help' bombs out with the error message:
> [...]

The current upstream version has fixed this (see the above URL).  The
relevant patch backported to the current Debian version is attached.

Best wishes,

   Julian
-------------- next part --------------
--- a/fontforgeexe/startui.c
+++ b/fontforgeexe/startui.c
@@ -1099,10 +1099,6 @@
     CheckIsScript(argc,argv); /* Will run the script and exit if it is a script */
 					/* If there is no UI, there is always a script */
 			                /*  and we will never return from the above */
-#ifdef FONTFORGE_CAN_USE_GDK
-    gdk_init(&argc, &argv);
-    gdk_set_allowed_backends("win32,quartz,x11");
-#endif
     if ( load_prefs==NULL ||
 	    (strcasecmp(load_prefs,"Always")!=0 &&	/* Already loaded */
 	     strcasecmp(load_prefs,"Never")!=0 ))
@@ -1185,6 +1181,10 @@
 	}
 #endif
     }
+#ifdef FONTFORGE_CAN_USE_GDK
+    gdk_init(&argc, &argv);
+    gdk_set_allowed_backends("win32,quartz,x11");
+#endif
 
     ensureDotFontForgeIsSetup();
 #if defined(__MINGW32__) && !defined(_NO_LIBCAIRO)


More information about the Pkg-fonts-devel mailing list