WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Fonts and I18N  (Read 1949 times)

Offline fault-tolerant

  • Newbie
  • *
  • Posts: 19
Fonts and I18N
« on: February 08, 2016, 04:24:07 AM »
Hi, Core people!  ;)

I've got an issue with minimal internationalization of piCore 7.0. I only need my Java application to display characters on several translated languages under X (I don't need international input/keyboards). This worked fine for me on Ubuntu and also on TinyCore, but on piCore the same actions won't work.

What I do is simple: copy the required fonts to the required location, currently two or three ttf files are enough, and then fc-cache -rv. Then it is usually enough to restart the application, or the entire X session.

To make things clear, the fc-cache actually recognizes the fonts, this is shown in the command output. I can also see that the fonts are different, for English letters. However for some other languages, like Chinese, Korean, Arabic, and others the most I get is either empty boxes or question marks, depending on a font.

Is it something I'm not aware about for this specific Core?

Thanks!
« Last Edit: February 08, 2016, 04:42:35 AM by fault-tolerant »

Offline fault-tolerant

  • Newbie
  • *
  • Posts: 19
Re: Fonts and I18N
« Reply #1 on: February 08, 2016, 08:13:40 AM »
With great thanks to @jgrulich and this message: http://forum.tinycorelinux.net/index.php/topic,19547.msg121018.html#msg121018 I have succeeded.

I didn't realize that this is not only up to fonts, but also up to locales. When it hit me I searched the forum and following the instructions in that message: got the getlocale.sh script from the main repository (@bmarkus, can you kindly add it to the piCore 7.0 repository?), ran it and marked all relevant languages. For each I used the UTF-8 version. Relevant TCZ file was created for me. Then I've added lang=zh_CN.UTF-8 to my cmdline.txt.

In order to display Asian langs I have to work with the Chinese locale. Middle east languages are also shown nicely, as well as special characters in Portuguese and German. Cyrillic languages are displayed as well. This is all a matter of fonts you find. For instance, if I use lang=en_US.UTF-8, I get all languages right except for Asian ones.

P.S. A good place to find compatible freeware fonts (got mine from there) is http://www.fonts2u.com.

Good luck.
« Last Edit: February 08, 2016, 08:24:50 AM by fault-tolerant »