1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-30 03:32:25 +00:00
putty-source/unix
Simon Tatham b088d77d58 GTK: hard-code some last-ditch fallback fonts.
If the user's choice of fonts can't be instantiated during initial
terminal-window setup, then we now automatically try two fallback
options, "client:Monospace 10" and "server:fixed", and only give a
fatal error if _no_ option allows us to open a terminal window.

Previously, on Wayland, PuTTY and pterm with default configuration
would completely fail to open a terminal window at all, because our
default font configuration is still the trad X11 "server:fixed", and
on Wayland, X11-style server-side bitmap fonts don't exist at all.

Conversely, in the GTK1 build of PuTTY which we're still supporting,
_client-side_ fonts aren't supported, so if a user had configured one
in their normal PuTTY configuration, then the GTK1 version would
similarly fail to launch.

Now both of those cases should work, because the fallbacks include a
client-side font _and_ a server-side one, and I hope that any usable
Pango system will make "Monospace" map to _some_ locally available
font, and that any remotely sensible X server has 'fixed'

I think it would be even better if there was a mechanism for the Conf
to specify a fallback list of fonts. For example, this might be
specified via a new multifont prefix along the lines of

  choices:client:Monospace 10:server:fixed

with the semantics that the "choices:" prefix means that the rest of
the string is split up at every other colon to find a list of fonts to
try to make. Then we could not only set PuTTY's default to a list of
possibilities likely to find a usable font everywhere, but also, users
could configure their own list of preferred fallbacks.

But I haven't thought of a good answer to the design question of what
should happen if a Conf font setting looks like that and the user
triggers the GUI font selector! (Also, you'd need to figure out what
happened if a 'choices:' string had another 'choices' in it...)
2025-01-09 21:33:21 +00:00
..
stubs Add lots more stub versions of standard code modules. 2023-05-29 15:54:34 +01:00
utils Arm: turn on PSTATE.DIT if available and needed. 2024-12-19 08:52:47 +00:00
agent-client.c Formatting: realign labels and case/default statements. 2022-08-03 20:48:46 +01:00
agent-socket.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
askpass.c Arm: turn on PSTATE.DIT if available and needed. 2024-12-19 08:52:47 +00:00
cliloop.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
CMakeLists.txt Arm: turn on PSTATE.DIT if available and needed. 2024-12-19 08:52:47 +00:00
columns.c GTK: fix y computation in align_next_to. 2022-09-06 11:39:01 +01:00
columns.h Improve the align_next_to mechanism. 2022-05-05 19:04:34 +01:00
config-gtk.c Replace integer context2 encoding in conf_editbox_handler. 2022-09-01 20:43:23 +01:00
config-unix.c Restructure dlgcontrol as a struct with an anon union. 2022-05-01 10:00:32 +01:00
console.c Merge tag '0.80'. 2023-12-18 14:47:48 +00:00
dialog.c Windows: rewrite request_file() to support Unicode. 2024-12-13 19:38:48 +00:00
fd-socket.c Centralise stub plug/socket functions. 2024-06-29 12:19:35 +01:00
gss.c Unix static GSSAPI: fix an uninitialised structure field. 2022-09-17 07:55:05 +01:00
gtk-common.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
gtkcompat.h Avoid treating non-X GDK display names as X ones 2024-12-15 00:07:21 +00:00
gtkmisc.h Convert a lot of 'int' variables to 'bool'. 2018-11-03 13:45:00 +00:00
keygen-noise.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
local-proxy.c New facility, platform_start_subprocess. 2022-09-01 20:43:23 +01:00
main-gtk-application.c Arm: turn on PSTATE.DIT if available and needed. 2024-12-19 08:52:47 +00:00
main-gtk-simple.c Arm: turn on PSTATE.DIT if available and needed. 2024-12-19 08:52:47 +00:00
network.c Fix build failures with NO_IPV6 defined. 2024-11-28 18:28:43 +00:00
no-gtk.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
noaskpass.c Better header comment for noaskpass.c. 2022-05-20 19:35:59 +01:00
noise.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
osxlaunch.c osxlaunch: stop setting DYLD_LIBRARY_PATH. 2017-12-20 10:04:02 +00:00
pageant.c Arm: turn on PSTATE.DIT if available and needed. 2024-12-19 08:52:47 +00:00
peerinfo.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
platform.h Windows: rewrite request_file() to support Unicode. 2024-12-13 19:38:48 +00:00
plink.c Arm: turn on PSTATE.DIT if available and needed. 2024-12-19 08:52:47 +00:00
printing.c Rename 'ret' variables passed from allocation to return. 2022-09-14 16:10:29 +01:00
procnet.c Generalise strbuf_catf() into put_fmt(). 2021-11-19 11:32:47 +00:00
psocks.c New abstraction for command-line arguments. 2024-09-26 11:30:07 +01:00
psusan.c Arm: turn on PSTATE.DIT if available and needed. 2024-12-19 08:52:47 +00:00
pterm-config-xpm.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
pterm-xpm.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
pterm.bundle OS X makefile: stop depending on JHBUILD_PREFIX. 2017-11-26 11:45:48 +00:00
pterm.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
pterm.plist Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
pty.c Avoid treating non-X GDK display names as X ones 2024-12-15 00:07:21 +00:00
putty-config-xpm.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
putty-xpm.c Rename most of the platform source files. 2021-04-26 18:00:01 +01:00
putty.bundle OS X makefile: stop depending on JHBUILD_PREFIX. 2017-11-26 11:45:48 +00:00
putty.c Arm: turn on PSTATE.DIT if available and needed. 2024-12-19 08:52:47 +00:00
putty.plist Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
serial.c Add memsets after allocation of all Backend implementors. 2021-10-30 17:28:28 +01:00
sftp.c Arm: turn on PSTATE.DIT if available and needed. 2024-12-19 08:52:47 +00:00
sftpserver.c Fix build failure on systems without fstatat. 2023-04-19 14:28:36 +01:00
sharing.c Pass an Interactor to new_connection(). 2021-10-30 18:19:56 +01:00
storage.c Rewrite some manual char-buffer-handling code. 2022-09-14 16:10:29 +01:00
unicode.c Rework Unicode conversion APIs to use a BinarySink. 2024-09-26 11:30:07 +01:00
unifont.c Rework Unicode conversion APIs to use a BinarySink. 2024-09-26 11:30:07 +01:00
unifont.h Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
uppity.c Arm: turn on PSTATE.DIT if available and needed. 2024-12-19 08:52:47 +00:00
uxsel.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
window.c GTK: hard-code some last-ditch fallback fonts. 2025-01-09 21:33:21 +00:00
x11.c Make x11_get_auth_from_authfile take a Filename. 2023-05-29 15:41:50 +01:00
x11misc.h Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00