WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to setup cyrilic fonts?  (Read 14691 times)

Offline starix

  • Newbie
  • *
  • Posts: 5
How to setup cyrilic fonts?
« on: July 08, 2010, 09:28:21 AM »
Micro Core Linux 3.x Alpha
Trying to get support of Russian lang, I did:
1) install kmap, glibc_gconv
2)
Code: [Select]
mkdir -pv /usr/lib/locale
localedef -i ru_RU -f ISO-8859-5 ru_RU
3) changed boot options to lang=ru_RU
4) changed /etc/profile = G_FILENAME_ENCODING=iso8859-5
5) backuped /etc/profile & /usr/lib/locale/locale-archive
6) reboot
7) sudo loadkmap < ru_win.kmap
Result: language seems to be changed ru Russian, BUT there is still no russian fonts...



but must be (this one on my router)


Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: How to setup cyrilic fonts?
« Reply #1 on: July 08, 2010, 09:59:25 AM »
Do you have the dejavu-fonts-ttf.tcz package installed?

That may do it.

Offline starix

  • Newbie
  • *
  • Posts: 5
Re: How to setup cyrilic fonts?
« Reply #2 on: July 08, 2010, 10:05:34 AM »
not installed...
install, reboot => no changes

Offline peterc

  • Newbie
  • *
  • Posts: 36
Re: How to setup cyrilic fonts?
« Reply #3 on: July 18, 2010, 02:19:04 PM »
TrueType fonts won't work on the console, so installing DejaVu won't help the situation (unless you want to switch to X). What you need are console fonts that include Cyrillic; I haven't done it myself, but try installing the console-cyrillic fonts (http://ftp.de.debian.org/debian/pool/main/c/console-cyrillic/console-cyrillic_0.9.orig.tar.gz). I'm a little unclear as to how to actually change the console font; it may be necessary to install console-tools (http://ftp.de.debian.org/debian/pool/main/c/console-tools/console-tools_0.2.3dbs-69.tar.gz), since I can't see anything in the TC documentation on the subject.

Hopefully this will point you in the right direction; if it works, please tell us what you did.

Offline peterc

  • Newbie
  • *
  • Posts: 36
Re: How to setup cyrilic fonts?
« Reply #4 on: July 18, 2010, 02:30:39 PM »
I don't know if MicroCore looks at /etc/sysconfig/console, but looking at the documentation for LinuxFromScratch (http://www.linuxfromscratch.org/lfs/view/6.3/chapter07/console.html), you may be able to use that to set the font and keymap.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to setup cyrilic fonts?
« Reply #5 on: July 19, 2010, 02:48:20 AM »
Our busybox includes loadfont, which is setfont stripped down. You only need to grab one psf font from the cyrillic archive above, the rest isn't necessary.

Then run "sudo loadfont < /path/to/font.psf", first in the console to test out and then in bootlocal.sh (without sudo).
The only barriers that can stop you are the ones you create yourself.

Offline rodin.s

  • Newbie
  • *
  • Posts: 10
Re: How to setup cyrilic fonts?
« Reply #6 on: September 03, 2010, 05:03:51 PM »
I know, it's not my topic but in my case it says:
Code: [Select]
tc@box:~$ sudo loadfont < Cyr_a8x16.psf
loadfont: KDFONTOP: Invalid argument

It says so under X, but in text mode font is loaded and I see Russian text until startx.
« Last Edit: September 04, 2010, 01:45:59 PM by rodin.s »

Offline mountpeaks

  • Newbie
  • *
  • Posts: 28
Re: How to setup cyrilic fonts?
« Reply #7 on: December 29, 2011, 05:47:01 AM »
I've experiencing the same problem.
Cyrillic issues track back to 2009!

« Last Edit: December 29, 2011, 06:38:43 AM by mountpeaks »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to setup cyrilic fonts?
« Reply #8 on: December 29, 2011, 12:22:50 PM »
@rodin.s, that is expected behavior, as the psf is a console font. Different fonts are needed for X apps (bitmap fonts for aterm and friends, TTF for gtk2/qt apps).
The only barriers that can stop you are the ones you create yourself.

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: How to setup cyrilic fonts?
« Reply #9 on: March 30, 2015, 07:22:37 AM »
Hi there one more time, yet in another thread. I've read it and tried to reproduce all actions needed to set cyrillic keymap (I need no locale, just want to be able to type in Ukrainian). So I have:
1. installed kmaps.tcz
2. made sudo loadkmap < /usr/share/kmap/qwerty/ua (in various combinations) [.kmap]
3. then sudo loadfont < /home/tc/console-fonts/pfs/ (various combinations of UniCyr, Cyr, etc.) [.psf]
4. Nothing happened except of that I could type plenty of ?????????? in the CLI. Then I tried to load yet another font from the folder above and started typing with blank symbols.
5. I tried to do it in reverse, that is, first I made loadfont and then loadkmap and gained no profit again.

I'm using pure CLI with graphics.KERNEL.

What's wrong?
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: How to setup cyrilic fonts?
« Reply #10 on: March 30, 2015, 08:21:49 AM »
Even Links showed me cyrillic symbols when I tried Character set->KOI-8RU just for fun. But, its keymap lacks several symbols and even a dot, and when I type something in Cyr (in Links only), and then try to remove it with Backspace, the text pointer shifts right for the Cyrillic string length. Maybe some encoding issue. What encoding is default in TC? I'm not sure.

UPD: it's okay now, at least in Links. I changed to UTF-8 and now the string length doesn't double.
« Last Edit: March 30, 2015, 08:30:00 AM by Scampada »
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline Scampada

  • Full Member
  • ***
  • Posts: 164
Re: How to setup cyrilic fonts?
« Reply #11 on: March 30, 2015, 06:09:59 PM »
I tried hard or, at least I tried, so after loadkmap and loadfont I could see Cyrillic symbols in the OUTPUT, but not when I typed them.
E.g. I typed and saw ???????, then I pressed Enter, the string was treated as a command and there were some output as: "/bin/sh: [NORMAL CYR SYMBOLS] : not found". I could also type in Cyrillic in Links setting Unicode UTF-8 in 'Character set' submenu.
Maybe for seeing Cyrillic symbols in typing I must set a relevant locale? But I don't want to see CLI output in my tongue; I want English there.
Also, when I tried to type in Cyrillic in vi, it was like I type one char and it prints a corresponding char and a space after it. Looked like "L o r e m  i p s u m . " Dunno what to do with that. I need Cyrillic in vi.
The winning entries in UNIX users' hymns competition were 'What's the buzz, tell me what's happening' and 'Strange Thing Mystifying' songs from A.L.Webber's musical.

Tiny Core Linux. Like Gentoo, except Gentoo is easier.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to setup cyrilic fonts?
« Reply #12 on: March 31, 2015, 04:33:19 AM »
The locale has separate settings for language and various sub-options like dates, currency, paper, etc. You can change all but LC_MESSAGES to your locale and have messages still in English.
The only barriers that can stop you are the ones you create yourself.

Offline oeai

  • Newbie
  • *
  • Posts: 22
  • 0 be 1 can 0 be if_0_then_1_else_0
    • Symbiants
Re: How to setup cyrilic fonts?
« Reply #13 on: July 20, 2015, 01:38:24 PM »
i found an interesting issue
i've installed kmaps and setup boot params
   
Code: [Select]
kmap=ruwin_cplk-UTF-8 ; # in file /tce/boot/extlinux/extlinux.conf boot linewhen i do
Code: [Select]
sudo loadfont ~/psf/UniCyr_8x16.psf  ; # in file /opt/bootlocal.sh  in terminal, then i can type with ???-???-???, but if i press enter after then i got раз-два-три (russian letters)
this also works with mcedit, but even better i can see letters with too much of space between, but after saving file i can read it normally
if i'm putting loadfont into opt/boot it doesn't work and i have to manually start it again,
but as for me, all i was needed just to type some texts in my olnb i think i'll make it work even without xorg now.

with xorg i've installed  xfonts, glibc2-locale base-locale, font-util, fontconfig, freetype, but all i needed to do was putting string
Code: [Select]
setxkbmap us,ru -option grp:caps_toggle & ; # in file ~/.xsession  
and it was working in geany and abiword, but i'd like to have xvesa, since there's not so much video ram
i'm fan of utf8, got it everywhere for compatibility

maybe some more tips any1?

there's an option that i found in gentoo, maybe that's the needed clue
Code: [Select]
DUMPKEYS_CHARSET="UTF-8"  ; # in etc/sysconfig/keymap but i don't know how to write it in sysconfig without some echo "" >> ././keymap command, so it was there before exec
« Last Edit: July 20, 2015, 02:09:17 PM by oeai »
symbiants from space

Offline oeai

  • Newbie
  • *
  • Posts: 22
  • 0 be 1 can 0 be if_0_then_1_else_0
    • Symbiants
Re: How to setup cyrilic fonts?
« Reply #14 on: July 20, 2015, 06:12:08 PM »
they told me, that i'm sending a pair of bytes with my keyboard and stty interpret each byte as a symbol, because "stty -a" terminal probably built in one byte with key "-iutf8". to interpret it as unicode it should be "iutf8". - i don't know how t change it, all other clues and things i made including getlocale didn't get any success
also as a solution i found there's a program luit that kinda filters such things out, but i'm not sure on how's it works. i think that rebuild of terminal can help and will be more like true way
with setfont i've add a simpler string
Code: [Select]
  setfont -v Cyr-a8x16; # in /opt/boot script that boots neccesary font from /usr/local/share/consolefonts, also with -m there's an option to transliterate keys from one codepage to another, but it's not working because of "-iutf8" i guess. i'm not sure how to send one byte unicode from keyboard as well as i don't know how to properly build luit or stty i thik it's more like kernel stuff. Maybe that's just a switch to invoke stty, so it should be changed somewhere without recompiling.

http://man.he.net/man1/luit
« Last Edit: July 20, 2015, 06:39:14 PM by oeai »
symbiants from space