how to set font in xterm on #openbsd? for example, i want

  • facename spleen-6
  • scaled up to 18px
  • no antialiasing
i've tried a few things in my .Xdefaults, but nothing works as expected

@hi This .Xdefaults works for me (I have poor eyesight, so adjust as needed):

#ifdef HIDPI
XTerm*faceName: spleen:pixelsize=64:antialias=false
XLock*font: spleen:pixelsize=64:antialias=false
#else
XTerm*faceName: spleen:pixelsize=32:antialias=false
XLock*font: spleen:pixelsize=32:antialias=false
#endif

I was wondering if this can be specified on the command line in order to test how it looks before putting it in .Xdefaults

@kasperd It can with the -fa and -fn options for xterm.

http://man.openbsd.org/xterm

xterm(1) - OpenBSD manual pages

@hi I'm using .Xresources like this: http://pkotrcka.inlisp.org/.Xresources and then don't forget to load it with xrdb: https://wiki.archlinux.org/title/X_resources

I have this in my .xinitrc / .xsession :
http://pkotrcka.inlisp.org/.xinitrc

@hi can't tell if it's similar on bsd, but on debian I have to remove some default config and source mine from my bashrc:

https://github.com/farvardin/dotfiles/blob/master/.Xresources

dotfiles/.Xresources at master · farvardin/dotfiles

Contribute to farvardin/dotfiles development by creating an account on GitHub.

GitHub
I don't think xterm itself can scale up anything.

pkg_add spleen
xset +fp /usr/local/share/fonts/X11/misc
# in .Xresources
*faceName: spleen-6
xrdb -merge .Xresources
You have to use xrandr, either
--dpi n
or
--scale .n --filter none

if you use gui programs, you might have a bad time

ymmv
@[email protected] thank you. seems like the only solution. i was hoping xterm can scale up...

@hi

```xrdb -merge .Xresources```

is the magic ingrident.

@hi there is xterm*facename and xterm*facesize. Also, there is xft*dpi (or xrandr —dpi). Not sure if that targets you question but that’s what I have here to deal with fint size.