spindle icon indicating copy to clipboard operation
spindle copied to clipboard

Unicode terminal font

Open Pitel opened this issue 13 years ago • 4 comments

When i change locale to my native cs_CZ.UTF-8 I get "square" characters insted of letters like ěščŽŘ.

Pitel avatar Jun 25 '12 09:06 Pitel

How do you change your locale? Does it work for your in X? Any chance the problem is that described under http://www.linuxfromscratch.org/lfs/view/development/chapter07/console.html "Some keymaps have dead keys..."

asb avatar Jul 07 '12 21:07 asb

I used rpi-config to set locale. It works in X, apps are in Czech language and event terminal emulator shows correct characters. It has nothing to do with dead keys, I use US keyboard layout anyway.

The problem is with standard terminal. Whe I do eg. sudo apt-get upgrade, it should show "Čtu seznamy balíků" (Reading package lists), but I see something like: "█tu senzmay balík█" because the console font does not handle these characters.

Pitel avatar Jul 08 '12 18:07 Pitel

The console uses utf8 encoding but fonts can contain only a limited number of glyphs, so they use a smaller code set and include a mapping table. The default font code set is Lat15 (Western Europe). The correct 8bit set for Czech would be Lat2. You can change it with sudo dpkg-reconfigure console-setup.

It might make sense to switch spindle to the combined Uni2 code set by default. This is a 512-glyph set that supports numerous locales simultaneously and has a full collection of available fonts. However, it still would not suit everyone out of the box.

(Also, using a 512-glyph font removes the ability to select intense background colours. I do not think this is a problem in practice since you can not rely on intense backgrounds not being implemented as blink anyway, and fedora switched to a 512-glyph default console font ages ago.)

jojopi avatar Jul 13 '12 13:07 jojopi

Okay, this is my /etc/default/console-setup, which works well:

# CONFIGURATION FILE FOR SETUPCON

# Consult the console-setup(5) manual page.

ACTIVE_CONSOLES="/dev/tty[1-6]"

CHARMAP="UTF-8"

CODESET="Lat2"
FONTFACE="TerminusBoldVGA"
FONTSIZE="8x16"

VIDEOMODE=

# The following is an example how to use a braille font
# FONT='lat9w-08.psf.gz brl-8x8.psf'

Pitel avatar Jul 13 '12 13:07 Pitel