site  contact  subhomenews

Fix DejaVu font problem for non-Latin

September 24, 2012 — BarryK
The guys who want to localise Puppy for Chinese and Japanese (and other non-Latin) languages, have a particular problem as many configuration files specify the 'DejaVu Sans' font.

The DejaVu home page gives an overview of the languages supported:
http://dejavu-fonts.org/wiki/Main_Page

To localise to Chinese or Japanese, a special font package is required to be installed. To get applications such as JWM (window manager) to use it, their config files must replace "DejaVu Sans" with just "Sans".
If the system recognises "Sans" as mapping to the new Chinese/Japanese font set, then it will work.

Actually, in theory the fontconfig mapping could remap "DejaVu Sans" to the new Chinese/Japanese font set, but it seems that no one has figured out how to do that. It would be the simplest solution though.

Anyway, I have modified two scripts to replace all occurrences of "DejaVu Sans" with just "Sans".

/usr/share/doc/langpack-template/pinstall.sh
This file is read by MoManager and becomes the post-install script for a langpack.
There is no Chinese or Japanese langpack yet (there is one for some older 4.x and early 5.x puppies but that is not compatible with recent pups). When someone uses MoManager to create a Chinese/Japanese langpack, it will have this new pinstall.sh in it.

/usr/local/petget/hacks-postinstall.sh
This takes care of replacing "DejaVu Sans" with "Sans" when certain packages are installed by the user.

Note, it is not just JWM that has this "DejaVu problem". There are various JWM and GTK theme PETs, and other PETs such as openbox, seamonkey, firefox.

You can find the updated scripts here:
http://bkhome.org/fossil/woof2.cgi/info/02cc3006a0

Comments

non-Latin Languages
Username: GCMartin
Maybe we can cnsult with Shinobar and others. They may be able to work with the distro/WOOF to achieve success. Shinobar, as I remember, has been addressing something akin to the blog issue for many years. Puppy is maturing. Here to help.

CJK langpacks
Username: shinobar
"Thanks for the script against the "DejaVu problem". The CJK(Chinese/Japanese/Korean) langpacks need special components: 1. They need special fonts. 2. They need special input method. 3. They need special files for making their locale. That is because they need special treatment. I and the Japanese team are working on this, but may need more time.

no all lang pet
Username: aarf
"wget -4c http://182.164.210.56/puppy/opt/lang_pack_all-0.9.sfs [code]--2012-09-28 04:48:02-- (try: 3) http://182.164.210.56/puppy/opt/lang_pack_all-0.9.sfs Connecting to 182.164.210.56:80... failed: Connection timed out. Retrying. --2012-09-28 04:48:26-- (try: 4) http://182.164.210.56/puppy/opt/lang_pack_all-0.9.sfs Connecting to 182.164.210.56:80... [/code]too many times. i've tried. can we have this pet hosted somewhere else please.

crashing gparted
Username: aarf
" while we are here. i have lang_pack_cjk-lupq-0.2.sfs in racy5.3 and luci528.005. i have a file that has a title written in chinese characters. it just shown as ?????.rar instead of the correct characters. when i try to do a gparted "check" of this partition with the ????.file on 8g kingston micro, gparted will crash without notice before finishing the check. happens in both racy and lupu.

name
Username: aarf
""file that has a title written in chinese characters" should be "file that has a file name written in chinese characters"

Re langpacks
Username: BarryK
"aarf, The langpacks that you are referring to are not officially supported for Puppy. The supported langpacks are so far those announced here: http://bkhome.org/archive/blog2/201204/wary-and-racy-53.html Do a search for "momanager" in my blog for more info.


Tags: woof