uobikiemukot / yaft

yet another framebuffer terminal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cyrillic characters are not displayed

alex3kov opened this issue · comments

Hi, thanks for making this great simple program freely available.
Here's the file that I use to test Cyrillic symbols display in terminals:

~: file fonttest.txt 
fonttest.txt: UTF-8 Unicode text
~: cat fonttest.txt 
а б в г д е ё ж з и к л м н о п р с т у ф х ц ч ш щ ъ ы ю я
А Б В Г Д Е Ё Ж З И К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ю Я

a b c d e f g h i j k l m n o p q r s t u v w x y z
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

When I do cat fonttest.txt in plain linux console (tty) - all characters are displayed. In yaft, there are just empty spaces in place of Cyrillic characters:

~: cat fonttest.txt 



a b c d e f g h i j k l m n o p q r s t u v w x y z
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Cyrillic characters are also replaced with empty spaces in mutt and ranger. Here's my cmdline and /etc/vconsole.conf (in case it matters):

~: cat /etc/vconsole.conf 
KEYMAP=ruwin_cplk-UTF-8
FONT=ter-c18b
FONT_MAP=8859-5
~: cat /proc/cmdline 
BOOT_IMAGE=/boot/vmlinuz-linux-zen root=UUID=<UUID> rw quiet video=DP-1:1920x1080@144 fbcon=map:10 fbcon=font:VGA8x8

yaft claims UTF-8 support on main page, so why are Cyrillic characters not displayed? Is additional configuration needed?

Hi, thank you for using yaft 😄

yaft claims UTF-8 support on main page, so why are Cyrillic characters not displayed? Is additional configuration needed?

Yes, yaft can handle UTF-8 encoding and Unicode BMP glyphs. But only If built-in fonts includes Cyrillic glyphs, you can see the glyphs in your display. Unfortunately default fonts does not have Cyrillic glyphs.

Please try these steps:

  1. check out latest develop branch (need this commit: b5f7c1c)
  2. export LANG=en_US.UTF-8 (or other UTF-8 variants)
  3. make mkfont_bdf
  4. ./glyph_builder.sh unifont
  5. then make yaft

Thanks, that works. Will you make that font built-in and default in a future release? Unicode is all over the place these days :)
My distro package just downloads your source release and runs make+make install on it: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=yaft

I'll change default fonts, If there are many of the same requests.

Currently yaft is including public fonts because I don't want to include GNU unifont in this repository due to its license. If default fonts changed to unifont, users must download unifont from internet. And upstream updates (download URL change or something) may break yaft's building process.

Are there other fonts with similar Unicode coverage, but with compatible license?

For example, Terminus font ( http://terminus-font.sourceforge.net/ ) supports ISO-8859-5 (Latin and Cyrillic) and license is not GPL (SIL Open Font License).

Personally I don't care about unifont specifically - as long as Unicode (Cyrillic in my case) gets displayed in "default" yaft installation (download source release -> make -> make install).

I see.

Having only ASCII by default is a bit odd in any given application in 2018 :)

In fact, default font includes some non-ASCII glyphs (ISO-2022-JP). Usually programmer does not care about foreign language...(It's my fault, Sorry)

Only few fonts support Unicode widely (so unifont is very rare font). Maybe I should merge several fonts to satisfy all users' requirements without unifont.

Anyway I'll reconsider about default font.

I merged terminus font into default font.
Cyrillic symbols are displayed like this: #37 (comment)

And this fix was merged into master branch.

It works, thanks!