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

From: Eli Zaretskii <[email-masked]>
Date: Mon, 02 Dec 2019 18:09:36 +0200

> From: Juanma Barranquero <[email-masked]>
> Date: Mon, 2 Dec 2019 13:57:42 +0100
> Cc: Robert Pluim <[email-masked]>, [email-masked], [email-masked]
> 
> >  If the frame's font requires that, the new session will use that same backend anyway. 
> 
> Is that so? I thought there could be problems with some fonts that Emacs wouldn't know to
> solve. Or do you mean that the user will have set the font backend in default-frame-alist?

We may be mis-communicating.

The way Emacs works, when it needs to find a font for a character, it
loops over all the available font backends, trying to find a font that
works with some backend and can display the character.  The first font
of the first backend that succeeds stops the loop.

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.

So now, if the frameset being restored specifies a font that cannot be
used with the default backend, Emacs will have to use the backend
which can handle that font.  If such a backend is available, Emacs
will be able to use the font, otherwise it won't.  But the same will
happen if we don't require a specific font backend at all, right?

So I don't see a reason to restore the backend from the desktop file.