Subject: bug#38442: 27.0.50; segmentation fault switching to cairo

From: Eli Zaretskii <[email-masked]>
Date: Mon, 02 Dec 2019 19:48:11 +0200

> From: Juanma Barranquero <[email-masked]>
> Date: Mon, 2 Dec 2019 18:28:32 +0100
> Cc: [email-masked], [email-masked], [email-masked]
> 
> > In most cases, the first (default) backend in the list finds a
> > suitable font, but some fonts can only be used with specific backends,
> > so they force Emacs to choose that backend.  An example is a the *.fon
> > bitmapped fonts on MS-Windows, which will force the GDI backend.
> 
> But the font-backend's list on Windows defaults to (harfbuzz gdi), so that's
> not surprising. Could Emacs automatically choose uniscribe, too, for some font,
> with the current default configuration, or would the user be forced to add
> uniscribe to the frame's font-backend list?

The uniscribe backend will not be used unless Emacs is started with it
being in the list of backends to register.

> If the user has a font that needs uniscribe, and they *have* to add uniscribe
> to font-backend in default-frame-alist or via set-frame-parameter or whatever,
> then there's a (likely uncommon) use case and I think it makes at least a bit
> of sense to save font-backend with the frame and restore it afterwards.

Every font that can use Uniscribe can also use HarfBuzz.  So this is
not a problem, and users have no reason to wish to use Uniscribe when
they restore their sessions.

Moreover, unless Emacs is started with Uniscribe (via the -xrm
command-line switch, or via the Registry), it will be unable to use
Uniscribe even if we tell it via the frameset.