magiblot / tvision

A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.
Other
1.99k stars 150 forks source link

In real tty (ctrl+alt+f1) show strange symbols #70

Closed sirlordt closed 2 years ago

sirlordt commented 2 years ago

Hello in a real tty using linux mint/ubuntu 20.04 show strange symbols.

Maybe is page code problem?

image

magiblot commented 2 years ago

This is a console font issue. Linux console fonts can only display up to 256 or 512 different characters. Different fonts support different sets of characters.

According to https://wiki.archlinux.org/title/Linux_console#Fonts, you can use the showconsolefont and setfont commands to see the characters supported by your console font and to change the console font in the current TTY. However, I don't know if that guide applies to Ubuntu. Ubuntu also provides a TUI setup to change the console font settings: https://feitam.es/how-to-change-tty-console-font-type-and-font-size/.

So, to solve this issue, I suggest you try different fonts until you find one which suits your needs.

sirlordt commented 2 years ago

Ok. But in Arch Linux work fine with no changes? If is true you can show me the font and config from the tty console for arch linux please?. I go to try apply the same settings to my tty console in Ubuntu.

Thanks.

magiblot commented 2 years ago

The default console font in Arch Linux uses the CP437 character set, which includes all the box-drawing characters used by Turbo Vision. So in Arch Linux it works out-of-the-box, at least for me.

However, it looks like Ubuntu comes with different console fonts, and none of them is CP437. So I'll share the default console font from Arch Linux and a custom one I use:

default8x16.psfu.gz VGASquarePx.psf.gz

Place these files in /usr/share/consolefonts and you should be able to load them with setfont default8x16 or setfont VGASquarePx. To make these changes permanent you probably have to use the setup utility as explained in the link I shared before.

sirlordt commented 2 years ago

Ok thanks so much!!!. Later of copy /usr/share/consolefonts you need close the session to setfont command work.

Now look great!!!.