KGS Issue - Asian Fonts

    Keywords: Software, Online Go

This page addresses the problem that Asian fonts are not correctly displayed on several operating systems.

Table of contents

// Note: This page has been merged from two different pages. Please feel free to edit the text to combine the best of both.

Windows

Java 1.4

An old KGS help page about fonts (still in web.archive.org) explained the method for java 1.4 users [ext] http://web.archive.org/web/20060220164919/kgs.kiseido.com/en_US/fonts.html

CBlue: This official help page at the time I'm writing this text only offers a way to display ONE of the asian languages. See my suggestion below to display ALL and also kyrillic etc.

Java 1.5

Java 5 users should see the fonts displayed as soon as they have the fonts on their computer.

But it seems to not be enough for Windows 98 and Windows Millenium users. Here is a method for those users: [ext] http://patwiggin.free.fr/spe/jpjava5en.php

Java 1.6

If the fonts are installed on your computer, they should be visible in Java. If not, you must provide a font library for Java to find.

Directions for doing this can be found at: [ext] http://www.kgsenclave.com/kgslanguagepacks

Please note there are many other language packs available if somebody has an issue with the one provided.

Discussion

CBlue: For those who use CGoban2 client to play on KGS and who only see some squares instead of asian fonts (Japanese, Chinese, Korean), here is a solution (Tested on Windows 2000 Pro SP4, Sun java 1.4 and 1.5, probably works similar for Linux. I'm not sure about very old Windows versions like 95.)

NO WARRANTY IS GIVEN FOR ANY OF THESE SUGGESTIONS. IF SOMETHING DOESN'T WORK ON YOUR PC I DON'T TAKE RESPONSIBILITY.

-Go here, and download the Cyberbit.ZIP file (Cyber Bitstream Font which contains all Unicode characters to display all of those three languages) [ext] ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/ Move the font into your system's font folder. (for example C:\WinNT\Fonts)

-Search your Java installation for a file called 'font.properties', make a backup (just in case..) and replace it with this one: [ext] http://www.c-blue.de/tmp/font.properties.zip (You might not be able to replace the file while Java is running, in that case close CGoban2 first.) After restarting CGoban2, you should be able to read Japanese, Chinese and Korean characters!

Pampalini?: sorry, but i just installed java 5.0 and still only boxes .. other apps display japanese fonts correctly, only java has this problem
windows version : win98SE english
the strange thing is japanese (and all other) characters are displayed correctly in every other application (IE,Opera,Word etc.) except Java (both 1.4 and 1.5)
I've tried a lot of things, with no result. (like using font.properties.ja instead of font.properties, the above cyberbitstream fonts - i've installed both the font and the font.properties file - uninstalling and reinstalling the java runtimes, checking windows update if i am maybe missing some windows component ...)

  • ookaminote?: I think I have something that is bound to work (it worked repeatedly in w98 anyway) :

-install the IME method
-the fonts ms gothic and msmincho both in the windows fonts files and in the directory of java where you find other fonts, in the directory lib i think but can't remember right now, be sure to rename them in .ttf (not ttc)
(you can find all this there : [ext] http://kanji.free.fr/download.php
-redo the swap of font.properties.ja into font.properties (don't forget to make a back up in a different directory)
- and relaunch KGS ^_^
before all this I suggest to reinstall java because you seem to have change a lot of settings

  • Zarlan: Windows 32? XP, 2k and 2k3 aren't 64-bit as far as I know. 95, 98 and ME can be called 9x though.
  • Zarlan: Well XP shouldn't have any problems, whatever language it is. The same goes for win 2003 I assume (haven't had the chance to try that OS out myself). I'm not quite as sure about 2000, but it shouldn't have any problems either. The win 9x OSes (95, 98 and ME) on the other hand... They don't have the same language support. It might still work though. For any windows I assume that you have set up windows to be able to read the language in question.

-Restart CGoban2 and you're settled.

(KGS 'new' help page about fonts is [ext] http://www.gokgs.com/help/faq/fonts.html?helpLocale=de_DE)

Maybe someone who has tried similar for different operating systems can contribute his/her results here.

  • Dronak: The problems of using an older OS. :( I've still got WinME. Even with java 1.5, the fonts aren't displaying properly. I tried some of the fixes here, using CyberBit?, IMEs were already installed, copying over the MSGothic and MSMincho fonts, installing the fonts again with that ie3lpkja file, none of it was working. I wonder if any of this is related to the fact that I can't find a font.properties file. I have things like fontconfig.Me.properties.src and psfont.properties.ja, but I can't find a plain old font.properties file. I can live without the Asian fonts in CGoban 2, but it would be nice to have them displayed. Does anyone think they can help me out?
  • Chris Hayashida: I think there was a change with Java 1.5. Here's what I found, when I installed Java 1.5.0 on my home computer running Windows 98 Second Edition:
  1. Copy the font files to the lib directory. It was C:\Program Files\Java\j2re1.5.0_01\lib\fonts on my computer.
  2. In my case, the fonts were .TTF files, but they were referenced in the fontconfig.*.properties.src files as .TTC files.
  3. Modify the corresponding fontconfig.*.properties.src file, found in the lib directory. Change the entries for MSMINCHO.TTC and MSGOTHIC.TTC to MSMINCHO.TTF and MSGOTHIC.TTF respectively.
  4. Save your modifications as a fontconfig.*.properties file Omit the .src extension. In my case, I saved it as fontconfig.98.properties in the lib directory. Note that if you save it as fontconfig.properties (without the OS/version extension) then other versions will take precedence. I specifically had problems with fontconfig.98.bfc, which was referred to before fontconfig.properties. When I renamed fontconfig.properties to fontconfig.98.properties, it was referred to first, so the Japanese showed up correctly.
  5. Restart CGoban2.
  • Dronak: Thanks for the info. I tried that, but it didn't work. I even uninstalled JRE 1.5.0_02 and installed it again, made the changes, and reloaded CGoban 2 from Java Web Start. I'm still seeing boxes if I go to, for example, Main in Room List; the Japanese and Chinese rooms have boxes, not characters. Oh well, maybe this just isn't going to work for me. Thanks anyway.
  • Chris Hayashida: I think it might be easier (and quicker) to troubleshoot this over e-mail. I don't know that the uninstall/reinstall will necessarily work, as there are sometimes files left in the directory tree that aren't removed. I actually had to go through and make sure that the j2re folders were removed.

If all else fails, we can always go back to 1.4. I *know* that works in multiple configurations. I do a lot of JRE troubleshooting for work. Anyway, if you want to e-mail me, send an e-mail to chris at prosum dot com, and I'll try to help you with what I can. I also have Me loaded on a notebook, so I'll give that a whirl and let you know what I find out. I also think this page needs to be WME'd... :(

Actually, I just had another brainstorm. It might be easiest to move all of the other fontconfig.* files to a subfolder (like Backup) while we're troubleshooting. I'm not sure, but maybe having too many files with the beginning 11 letters the same might be giving Windows Me some issues. Since you only need the fontconfig.Me.properties, you can edit the fontconfig.Me.properties.src file, make the changes, and save it as fontconfig.Me.properties. (BTW, are you sure you're seeing all the file extensions? If you have that turned off, that could be causing problems, too.) After you're done making those changes, you can move all the other files (fontconfig.*.properties, fontconfig.*.properties.src, fontconfig.*.bfc) to the backup directory so they're out of the way for the time being. If you want to troubleshoot this offline, send me an e-mail. Good luck.


MacOS X

As for version 2.6.11 of CGoban, all fonts are displayed correctly (at last!), so the following instructions are obsolete. chtito


These instructions are straight from KGS's font help page, with a small exception.

1. Right-click (or control-click) on the CGoban app icon and choose "Show Package Contents".

2. Open the "Contents" folder.

3. Double-click on the "Info.plist" file.

There are two possibilities here.

If the file opens in Property List Editor:

4a. Expand the "Root" list. (Click the triangle to the left of the word.)

5a. Find "CFBundleDevelopmentRegion". The string to the right should say "English". Double-click this and replace "English" with the name of the language you want to use. ("Japanese" works for Asian languages, to my knowledge.)

If MacOS asks which application you want to open the file with, and Property List Editor is not available, choose TextEdit, and:

4b. Find the string "CFBundleDevelopmentRegion" in the file.

5b. In the <string> element immediately following that line, replace "English" with the language you wish to use ("Japanese", for example).

6. Save and quit.

There is a side effect to this, however: the Apple menu and the stub CGoban menu in the menu bar appear in Japanese. To access the Apple menu, simply switch to a different app temporarily.


Malweth - This worked great for me on Windows 2000 with no Admin access (no Admin access means you can only install Java up to version 1.3.1 and cannot install the MS IMEs). Weiqi.tom.com is going to be a lot nicer looking now :)


Linux

文泉驿正黑 Font

Modified from these instructions [ext] http://www.asahi-net.or.jp/~ik2r-myr/kanji/linos_en.htm

Depending on the Linux distribution, the following lines might have to be executed in order for the asian text to render correctly:

 cd $JAVA_HOME/lib/fonts
 mkdir fallback (use su or sudo command)
 cd fallback
 ln -s /usr/share/fonts/TTF/wqy-zenhei.ttc (use su or sudo command)

You can acquire font from your package manager (instructions on the first link) or [ext] http://wenq.org/index.cgi?ZenHei%28en%29 or [ext] http://sourceforge.net/projects/wqy/files/wqy-zenhei/

   License  : GPL v2 (with font embedding exception **)
   ** [ext] http://wenq.org/index.cgi?ZenHei%28en%29#Copyright_disclaimer_and_license

Debian

A practical guide(by helger) for debian users (other linux distros handle it similarly) how to see Korean/Japanese fonts in linux.

Java 1.4

  1. Install Korean fonts: apt-get install ttf-baekmuk, apt-get install xfonts-baekmuk
  2. Link or copy all fonts from /usr/share/fonts/truetype/baekmuk to $JAVA_HOME/lib/fonts (if $JAVA_HOME points a j2re installation) or to $JAVA_HOME/jre/lib/fonts(if it points to a j2sdk installation).
  3. cd to the destination directory (.../lib/fonts), do ttmkfdir > fonts.dir (for this you might have to do apt-get install ttmkfdir at first)
  4. cd .., add the next to the end of the font.properties:
 serif.2=-misc-Baekmuk Batang-medium-r-normal--0-0-0-0-c-0-ksc5601.1987-0
 serif.bold.2=-misc-Baekmuk Batang-medium-r-normal--0-0-0-0-c-0-ksc5601.1987-0
 sansserif.2=-misc-Baekmuk Gulim-medium-r-normal--0-0-0-0-c-0-ksc5601.1987-0
 sansserif.bold.2=-misc-Baekmuk Gulim-medium-r-normal--0-0-0-0-c-0-ksc5601.1987-0

Restart cgoban. It should work. (Let me know if it does not.) To see both Korean and Japanese, just add

 sansserif.3=-wadalab-gothic-medium-r-normal--0-0-0-0-p-0-jisx0208.1983-0
 sansserif.bold.3=-wadalab-gothic-medium-r-normal--0-0-0-0-p-0-jisx0208.1983-0
 serif.3=-watanabe-mincho-medium-r-normal--0-0-0-0-p-0-jisx0208.1983-0
 serif.bold.3=-watanabe-mincho-medium-r-normal--0-0-0-0-p-0-jisx0208.1983-0

at the end of your font.properties. (For this, you obviously must have the watanabe fonts installed, use apt-cache search watanabe to find them.)

For adding more fonts (Chinese, ...) just follow the same pattern.

Java 1.5 (beta 2)

I have no idea why the next sequence works, but it does so on my box. (Documentation says that you also must do something else, but for me the next two steps were sufficient.)

  1. Get all the same Korean/Japanese fonts.
  2. Create directory $JAVA_HOME/jre/lib/fonts/fallback
  3. Copy the files into that directory, or link to the files from it.

helger


penguin: The [ext] Cyberbit font from netscape works for me in java 1.5.0 on linux --- no boxes in the entire room list on KGS. Just for clarity, I didn't have to create a fonts.dir file, nor a font.properties file, in the fallback directory, as one might normally expect from dealing with java 1.4. But see the following rewrite of Helger's instructions. (Delete this comment and the previous guide when the following guide has been vetted/confirmed.)


This is a rewrite of helger's instructions

Linux (should be universal; tested with Slackware 10.0)

First, get the [ext] Cyberbit font from netscape. Unzip it to obtain the Cyberbit.ttf file. (You might already have a copy in /usr/X11R6/lib/X11/fonts/TTF/, or some similar location.)

In the following, you might be able to use symlinks to your system's copy of Cyberbit.ttf rather than copying the file --- it is about 13M. (penguin: symlinks didn't work for me when using ttmkfdir, ymmv.)

Java 1.4 (tested with j2sdk-1_4_2_05-linux-i586)

  1. copy Cyberbit.ttf to $JAVA_HOME/lib/fonts (if $JAVA_HOME points a j2re installation), or to $JAVA_HOME/jre/lib/fonts (if it points to a j2sdk installation).
  2. cd to the .../lib/fonts directory you used in the previous step.
  3. do ttmkfdir -o junk (you can locate a copy of ttmkfdir [ext] here)
  4. copy the lines in junk which pertain to the Cyberbit font to the end of your fonts.dir file, and change the number at the top to reflect the number of data lines in the file --- this just happened to be 88 on my system. (That is, the file is 89 lines long; the first line is just '88', and is followed by 88 lines of font info. wc -l fonts.dir may help here.) You might be able to get away with ttmkfdir -o fonts.dir, but back up the original file first; this really messed up the fonts in cgoban2 when I tried it (think supertiny CGoban2 main window and invisible fonts). It appears that ttmkfdir is too ambitious when dealing with java's Lucida fonts.
  5. cd .. (change to the directory above the directory you changed to in step 2)
  6. add the next to the end of the font.properties file (note that the gobbledygook after the '=' is just the end of the line from the ttmkfdir output which pertains to Cyberbit's jisx font):
 serif.2=-Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-jisx0201.1976-0
 serif.bold.2=-Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-jisx0201.1976-0
 sansserif.2=-Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-jisx0201.1976-0
 sansserif.bold.2=-Bitstream-Bitstream Cyberbit-medium-r-normal--0-0-0-0-c-0-jisx0201.1976-0

Restart CGoban2. It should work for all the asian fonts (and Hebrew! others?) on KGS. If it doesn't try again and make sure all instances of java are shut down before restarting CGoban2.

Note: Earlier instructions were ttmkfdir >junk. Changed to ttmkfdir -o junk per version shipping with RedHat. File is 101290 bytes dates Sep 15, 2003

Note: In Gentoo (not sure if this is distro specific), I had to change the lines in font.properties to serif.1= , serif.bold.1=, etc. There were .1 lines in the file already, but they were commented out and the .2 lines were just being ignored.

TODO: contact helger for help? Helger?

Java 1.5 (tested with jdk-1_5_0-nb-4_0-beta2-bin-linux and jre-1_5_0-linux-i586)

penguin: I have no idea why the next sequence works, but it does so on my box. (Helger claimed the (unreferenced) documentation said that you also must do something else, but for me the following steps were sufficient.)

  1. Create directory $JAVA_HOME/lib/fonts/fallback (if $JAVA_HOME points a jre installation), or else create directory $JAVA_HOME/jre/lib/fonts/fallback (if $JAVA_HOME points to a jdk installation) [someone please confirm the changed/correct j2re/jre j2sdk/jdk terminology for 1.4/1.5]
  2. Copy Cyberbit.ttf to the .../lib/fonts/fallback directory you made in step 1.
  3. Thats' it!

Restart CGoban2. It should work for all the asian fonts (and Hebrew! others?) on KGS. If it doesn't try again and make sure all instances of java are shut down before restarting CGoban2.

macelee: The above procedure was tested with a freshly installed j2sdk1.5 and proved to be working well. I can see Chinese, Japanese and a few other languages that I don't recognize. Remember to update the PATH variable if you are upgrading your Java environment from a previous version. For Webstart users, your web browser should be reconfigured to associate the jnlp file to the new Webstart binary.

frostschutz?: The above didn't work for me (maybe because I'm using Blackdown and not Sun Java?), so I came up with another (very dirty) method:

Copy Cyberbits.ttf to $DIR_JAVA/jre/lib/fonts/, rename *.ttf to *.ttf.old, and create a symlink for each ttf File that points to Cyberbit.ttf.old. (In other words, replace all *.ttf with symlinks to Cyberbit font).

This way Java is forced to use Cyberbit font for everything. All characters supported by Cyberbit (and that are lots) will now show up correctly.

iwakun?: Neither proceedure worked for me right away. I had to uninstall both progams (java and cgoban), reinstall java (1.5), mkdir fallback (in $DIR_JAVA/jre1.5VER#/lib/fonts) and put Cyberbit.ttf into it. Then I reinstalled CGoban 2 and it worked!

Java 1.6 (JRE 1.6.07 on Ubuntu 8.10 Intrepid 32 bit)

Hactar: Java 1.6 displays most Asian fonts correctly by default, but some simplified Chinese characters are displayed as squares. And penguin's method for Java 1.5 still works for me.


Cyberbit Fonts

kuiper?: The Cyberbit font could now be found at [ext] this address. It looks that [ext] ftp://ftp.netscape.com is not working.


KGS Issue - Asian Fonts last edited by 2601:05cd:c101:3340 on June 12, 2020 - 19:53
RecentChanges · StartingPoints · About
Edit page ·Search · Related · Page info · Latest diff
[Welcome to Sensei's Library!]
RecentChanges
StartingPoints
About
RandomPage
Search position
Page history
Latest page diff
Partner sites:
Go Teaching Ladder
Goproblems.com
Login / Prefs
Tools
Sensei's Library