Pidgeot / python-lnp

Cross-platform re-implementation of the Lazy Newb Pack launcher.
ISC License
64 stars 10 forks source link

LNP custom terminal does not escape spaces/quotes, so can't specify font #165

Closed bradleeedmondson closed 4 years ago

bradleeedmondson commented 4 years ago

Using LNP on Manjaro with 4k screen, the actual game scales well, but the dfhack terminal window does not. The default background and font color for me in xterm/urxvt also aren't great. Rather than replace all default fonts (e.g. .Xresources[1]), I've tried choosing specific font family, size, color, and background color on the command line with the custom terminal option. I found a set of options that spawns a nice-looking terminal window outside the game (i.e. straight from gnome): urxvt -bg gray30 -fg Grey89 -fn "xft:DejaVu Sans Mono:pixelsize=28"

However, when I try it in the custom terminal option, with urxvt -bg gray30 -fg Grey89 -fn "xft:DejaVu Sans Mono:pixelsize=28" -e $, it fails:

urxvt: "Sans": malformed option.
urxvt: "Mono:pixelsize=28"": malformed option.
urxvt: unable to load base fontset, please specify a valid one using -fn, aborting.

This seems to be urxvt reporting errors on multiple space-delineated options, so I have to think LNP is not handling either the double-quotes or the spaces in "xft:DejaVu Sans Mono:pixelsize=28" correctly (note: starting urxvt from gnome, you do indeed pass in those quotes to specify an xft font).

After a long time tweaking, I just found I'm able to workaround this by giving up on specifying font family, like so: xterm -bg gray30 -fg Grey89 -fs 10 -e $

But shouldn't the custom terminal dialog be able to hand strings with spaces as arguments, enabling (among other things) font family specification?

[1] https://wiki.archlinux.org/index.php/X_resources