On Thu, Oct 15, 2026 at 10:27:49PM +0100, Paul Jewell wrote:
> I have installed OpenBSD on a Lenovo X390, and I am very happy with the
> process so far. I would like to have terminal based programs like btop
> display the correct box characters,

The default font used on the console is usually 'spleen', (the default
console font on sparc64 is 'gallant' instead).

There are several versions of the spleen font for different resolutions, but
none of them that are used by default include glyphs for the box characters.

A variation of the spleen font that has the line drawing characters is:
spleen8x16-ibm.h.  You would have to load this manually to use it, and it's
limited to just that one resolution.

> and in my investigations so far, I have
> seen a couple of comments:
> 
> - Change the terminal type from vt220 to pccon0 in /etc/ttys

Not recommended.  Using pccon in /etc/ttys will not fix this issue, and may
introduce other known issues.

If you want to use something other than the vt220 terminal type on the
console, set it to xterm.  I fixed a lot of issues a few years ago to make
this work well enough for the vast majority of users.  If you find any console
programs that misbehave with TERM=xterm but not with TERM=vt220, but please do
report it.  This won't get you the box character, but it will get you colour.

> - "You need to recompile the kernel"...

If you want to include additional console fonts in the kernel for use as the
default console font, then yes you will need to.

> I have tried changing the terminal type, but it seems I need to do more to
> achieve what I want as this didn't seem to work (after a reboot). The FAQ
> gives instructions for VGA driven devices, but states that the methods
> shared will not work with newer devices using the drm driver.

The FAQ entries talking about the VGA driver are mostly historic now, and
don't have any relevance for most users who are using the framebuffer console.

> Where would I find official documentation which would help me understand
> what I need to do to resolve this? I do understand that once I put a window
> manager on the machine, I will have no issues in the graphical terminal
> emulators used there but I feel this should be changeable for the basic
> terminals as well.

For the time being, there is no easy way to resolve it from a user
perspective.

Historically, the line drawing characters along with various accented
characters were implemented as alternative character sets and switched in and
out of the 128 - 255 range above the standard ASCII characters.  Availability
depended on what your hardware's text modes were capable of.

The framebuffer console is designed to work with just one font at a time, so
there is no provision for mapping in these sets of alternate glyphs (*).

However, it does support directly loading fonts with many thousands of
characters, (typically following the UCS-2 layout), and those can be directly
accessed in UTF-8 mode.  This would be the correct, modern, and
standards-compliant way to implement the box characters on the console.

Unfortunately the UTF-8 mode on the console is buggy and incomplete.  I fixed
some of it a couple of years ago, but bugs remain.

(*) Technically this is not 100% true.  The existing code in OpenBSD has the
    capability to translate ASCII character values into other codepoints, so
    somebody could in theory design a font with the box drawing glyphs in the
    256 - 384 region, and then code in a translation table as a custom regional
    variation to kind of 'reach into' the high range without using UTF-8 mode.
    But nobody has done that, and almost certainly never will.  The future is
    full UTF-8 support.

Reply via email to