Skip to content

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

@bradleeedmondson

Description

@bradleeedmondson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions