Broken Japanese support in StarOffice, OpenOffice and Abiword.
I am using SuSE 8.0 installed from the start in Japanese.... so all of the Japanese CJK stuff is loaded and set as the default environment for all users. Unfortunately, the following applications do not suipport Japanese correctly: * StarOffice - japanese text entered appears as empty rectangles. * OpenOffice 1.0 (US and Japanese editions) - japanese text entered appears as empty rectangles. * AbiWord - Japanese text appears as undecoded garbled ASCII (eg. $CA$99) * KWrite, KSpread, KMail - much of Japanese entered vanishes (eg. ??? would result in ??.... the ? would always disappear... same with many Kanji). * Konqueror - no japanese text gets into any input boxes. On the other hand, these other applications work perfectly: * Netscape 4.7, 6.x, and 7.x * Konsole (KDE X terminal) * vim (/usr/bin/vi --> /usr/bin/vim) * kterm Why if I installed a 100% Japanese environment from the start is it that many of the significant applications are not accepting Japanese input? Is there something that I am missing?
PS: I am using a PC purchased in the US with a US keyboard. David Nettles wrote:
I am using SuSE 8.0 installed from the start in Japanese.... so all of the Japanese CJK stuff is loaded and set as the default environment for all users.
Unfortunately, the following applications do not suipport Japanese correctly:
* StarOffice - japanese text entered appears as empty rectangles. * OpenOffice 1.0 (US and Japanese editions) - japanese text entered appears as empty rectangles. * AbiWord - Japanese text appears as undecoded garbled ASCII (eg. $CA$99) * KWrite, KSpread, KMail - much of Japanese entered vanishes (eg. ??? would result in ??.... the ? would always disappear... same with many Kanji). * Konqueror - no japanese text gets into any input boxes.
On the other hand, these other applications work perfectly:
* Netscape 4.7, 6.x, and 7.x * Konsole (KDE X terminal) * vim (/usr/bin/vi --> /usr/bin/vim) * kterm
Why if I installed a 100% Japanese environment from the start is it that many of the significant applications are not accepting Japanese input? Is there something that I am missing?
David Nettles
I am using SuSE 8.0 installed from the start in Japanese.... so all of the Japanese CJK stuff is loaded and set as the default environment for all users.
Unfortunately, the following applications do not suipport Japanese correctly:
* StarOffice - japanese text entered appears as empty rectangles.
StarOffice 5.2 doesn't support Japanese.
* OpenOffice 1.0 (US and Japanese editions) - japanese text entered appears as empty rectangles.
This works, you just have to use suitable fonts. See also http://lists.suse.com/archive/m17n/2002-Aug/0004.html and the followups, this should help.
* AbiWord - Japanese text appears as undecoded garbled ASCII (eg. $CA$99)
Works, see also http://www.suse.de/~mfabian/suse-cjk/abiword.html
* KWrite, KSpread, KMail - much of Japanese entered vanishes (eg. ??? would result in ??.... the ? would always disappear... same with many Kanji).
This works. Just choose suitable fonts. By the way, if the question marks above were supposed to be Japanese, check the settings of your MUA and don't send the mail with charset=us-ascii.
* Konqueror - no japanese text gets into any input boxes.
Works as well. KWrite, KMail, Konqueror ... certainly work with the default settings on SuSE Linux 8.0 after a installation in Japanese, therefore I suspect you screwed something up in the KDE setup.
On the other hand, these other applications work perfectly:
* Netscape 4.7, 6.x, and 7.x
Well, Netscape 4.7 crashes rather often ...
* Konsole (KDE X terminal)
Konsole sort of works for Japanese in SuSE Linux since my colleague Waldo Bastian fixed it (i.e. in SuSE Linux >= 8.0). But it is still *very* buggy for Japanese.
* vim (/usr/bin/vi --> /usr/bin/vim) * kterm
Why if I installed a 100% Japanese environment from the start is it that many of the significant applications are not accepting Japanese input? Is there something that I am missing?
Looks like your are doing something wrong in KDE.
--
Mike Fabian
Mike Fabian wrote:
David Nettles
writes: * StarOffice - japanese text entered appears as empty rectangles.
StarOffice 5.2 doesn't support Japanese.
Hmmm.... that 's too bad, but it does explain why it doesn't work.
* OpenOffice 1.0 (US and Japanese editions) - japanese text entered appears as empty rectangles.
This works, you just have to use suitable fonts.
See also http://lists.suse.com/archive/m17n/2002-Aug/0004.html and the followups, this should help.
OK, I found that in OpenOffice there are two Japanese fonts (東風ゴシッ ク、東風明朝) and that if I type my text with those things work fine. It's too bad that if I am using Times Roman and I begin typing Japanese that it does not simply select the nearest matching Japanese font for use. I found a thread on this topic where someone else lamented this point. I hope that this changes.
* AbiWord - Japanese text appears as undecoded garbled ASCII (eg. $CA$99)
Works, see also http://www.suse.de/~mfabian/suse-cjk/abiword.html
I wish that it worked.... read on, please....
* KWrite, KSpread, KMail - much of Japanese entered vanishes (eg. ??? would result in ??.... the ? would always disappear... same with many Kanji).
This works. Just choose suitable fonts.
* Konqueror - no japanese text gets into any input boxes.
Works as well.
KWrite, KMail, Konqueror ... certainly work with the default settings on SuSE Linux 8.0 after a installation in Japanese, therefore I suspect you screwed something up in the KDE setup.
Looks like your are doing something wrong in KDE.
I wish that it was the case, but it would seem not. My system was installed from scratch in Japanese. My users account was pulled over from a previous English installation that I tweaked to fit Japanese, but to re-test everything I created two new accounts (test1, test2) on this system as 100% clean default Japanese accounts. Unfortunately, all of the same problems are still present. The users are 100% Japanese config, yet the all of the KDE problems still persist and Abiword still does not work. I did install the qt3 packages that are outlined in your site and rebooted. I have tested this in every window manager available with SuSE 8.0. I went a 2 steps further: I have 2 computers that I did a new clean install of SuSE-8.0 in Japanese mode, then created brand new accounts. The same conditions continue to persist. At this point I am fairly confident that I have not affected the KDE configuration -- these installs are quite virgin. All problems still persist. It would seem that there is some kind of extra steps that one must perform after installing SuSE 8.0 in Japanese mode for Japanese to work reasonably. What might you recommend?
Mike Fabian wrote:
David Nettles
writes: * KWrite, KSpread, KMail - much of Japanese entered vanishes (eg. ??? would result in ??.... the ? would always disappear... same with many Kanji).
This works. Just choose suitable fonts.
Question #1: how would I choose an appropriate font? In KWord I selected the Mincho fonts and got no text at all. Question #2: the problem that I am experiencing is disappearing text. The codes are not being passed through to the application's input it seems.
Hi everyone, I am now in Taiwan studying chinese and wonder what sw is used to put the pronounciation symbols (bo-po-mo-fo) in vertical script on the right side of a chinese character. I know that the CKJ-package in LaTeX has rubies, but they are on the top and also don't contain tone symbols. Any ideas anyone? Of course GPL sw is preferred. Thanks, Stefan
Stefan Friedrich
Hi everyone,
I am now in Taiwan studying chinese and wonder what sw is used to put the pronounciation symbols (bo-po-mo-fo) in vertical script on the right side of a chinese character. I know that the CKJ-package in LaTeX has rubies, but they are on the top
If you use CJK-LaTeX for vertical writing, the rubies are on the right side.
and also don't contain tone symbols.
You can write anything you like into the rubies in CJK-LaTeX.
Any ideas anyone? Of course GPL sw is preferred.
I think CJK-LaTeX is OK for that purpose.
--
Mike Fabian
Mike Fabian
Stefan Friedrich
writes: I am now in Taiwan studying chinese and wonder what sw is used to put the pronounciation symbols (bo-po-mo-fo) in vertical script on the right side of a chinese character. I know that the CKJ-package in LaTeX has rubies, but they are on the top
If you use CJK-LaTeX for vertical writing, the rubies are on the right side.
and also don't contain tone symbols.
You can write anything you like into the rubies in CJK-LaTeX.
Any ideas anyone? Of course GPL sw is preferred.
I think CJK-LaTeX is OK for that purpose.
Have a look at the Japanese example file:
/usr/share/doc/packages/cjk-latex/examples/UTF8-oku-no-hosomichi.tex
it shows ruby with vertical writing.
You can do the same in Chinese.
--
Mike Fabian
Uhm... Is there something that I am missing here? 3 computers. 3 clean SuSE 8.0 installations using US keyboards. Same outcomes. When you indicated "choose a [better|different|appropriate] font" with regards to the KDE stuff, what did you mean? I did try selecting different fonts within the Word application with no good result. Any advice? David Nettles wrote:
Mike Fabian wrote:
David Nettles
writes: * StarOffice - japanese text entered appears as empty rectangles.
StarOffice 5.2 doesn't support Japanese.
Hmmm.... that 's too bad, but it does explain why it doesn't work.
* OpenOffice 1.0 (US and Japanese editions) - japanese text entered appears as empty rectangles.
This works, you just have to use suitable fonts.
See also http://lists.suse.com/archive/m17n/2002-Aug/0004.html and the followups, this should help.
OK, I found that in OpenOffice there are two Japanese fonts (東風ゴ シック、東風明朝) and that if I type my text with those things work fine. It's too bad that if I am using Times Roman and I begin typing Japanese that it does not simply select the nearest matching Japanese font for use. I found a thread on this topic where someone else lamented this point. I hope that this changes.
* AbiWord - Japanese text appears as undecoded garbled ASCII (eg. $CA$99)
Works, see also http://www.suse.de/~mfabian/suse-cjk/abiword.html
I wish that it worked.... read on, please....
* KWrite, KSpread, KMail - much of Japanese entered vanishes (eg. ??? would result in ??.... the ? would always disappear... same with many Kanji).
This works. Just choose suitable fonts.
* Konqueror - no japanese text gets into any input boxes.
Works as well.
KWrite, KMail, Konqueror ... certainly work with the default settings on SuSE Linux 8.0 after a installation in Japanese, therefore I suspect you screwed something up in the KDE setup.
Looks like your are doing something wrong in KDE.
I wish that it was the case, but it would seem not.
My system was installed from scratch in Japanese. My users account was pulled over from a previous English installation that I tweaked to fit Japanese, but to re-test everything I created two new accounts (test1, test2) on this system as 100% clean default Japanese accounts. Unfortunately, all of the same problems are still present. The users are 100% Japanese config, yet the all of the KDE problems still persist and Abiword still does not work.
I did install the qt3 packages that are outlined in your site and rebooted.
I have tested this in every window manager available with SuSE 8.0.
I went a 2 steps further: I have 2 computers that I did a new clean install of SuSE-8.0 in Japanese mode, then created brand new accounts. The same conditions continue to persist.
At this point I am fairly confident that I have not affected the KDE configuration -- these installs are quite virgin.
All problems still persist.
It would seem that there is some kind of extra steps that one must perform after installing SuSE 8.0 in Japanese mode for Japanese to work reasonably.
What might you recommend?
Hallo Stefan! I know you are in Taiwan, since we met ont the plane in August!! Hope things go well for you. I had the same problem with Japanese. There is supposed to be a vertical style option somewhere in CJK, but I do not know how good it is. I have been using CJK for 6 years, and I am using my old version, not the package from SuSE. I did a hack on the CJK code, which optionally rotates all Characters by 270 degrees, including ruby. Doing so, the ruby appear automatically on the right side of the Chinese Character. The hack includes some adjustments for placement of punctuation characters, because some may not be rotated, and others must be moved a bit. Are you using the ntu fonts (ntu_kai.ttf , ntu_mr.ttf , ntu_li_m.ttf , free for you to use, but SuSE is not permitted to bundle them), or Arphic fonts? ntu fonts are Big5 encoded, so they can be converted to pfb font sets, which is nicer in Postscript or pdf then bitmapped ones generated by ttf2pk. I may look into this Chinese vertical issue as well in not so far future. (Stefan, you may ask me more and auf Deutsch) Thomas Stefan Friedrich wrote:
Hi everyone,
I am now in Taiwan studying chinese and wonder what sw is used to put the pronounciation symbols (bo-po-mo-fo) in vertical script on the right side of a chinese character. I know that the CKJ-package in LaTeX has rubies, but they are on the top and also don't contain tone symbols.
Any ideas anyone? Of course GPL sw is preferred.
Thanks, Stefan
Thomas Piekenbrock
I had the same problem with Japanese. There is supposed to be a vertical style option somewhere in CJK, but I do not know how good it is.
I have been using CJK for 6 years, and I am using my old version, not the package from SuSE. I did a hack on the CJK code, which optionally rotates all Characters by 270 degrees, including ruby. Doing so, the ruby appear automatically on the right side of the Chinese Character. The hack includes some adjustments for placement of punctuation characters, because some may not be rotated, and others must be moved a bit.
Correct vertical variants of punctuation characters are used by CJK-LaTeX if the font used has a GSUB table for vertical context. The free Japanese Kochi TrueType fonts have such a table, therefore it works perfectly with the Kochi fonts. You can check whether such a GSUB table is available with 'ftdump': ftdump /usr/X11R6/lib/X11/fonts/truetype/kochi-mincho.ttf [...] GSUB table ------------------------------------------------------------------------------ script `kana' (index 0): default language system: feature `vert' (index 0; lookup 0) language `JAN ' (index 0): feature `vert' (index 0; lookup 0) Lookups: 0: type 1, flag 0x1 ------------------------------------------------------------------------------ The free Chinese Arphic TrueType fonts don't have such a GSUB table, therefore punctuation characters don't work perfectly in vertical mode with the Arphic fonts. But this is just a font problem, as soon as you have fonts with a good GSUB table for this purpose, it works. See this screenshot: http://www.suse.de/~mfabian/m17n/cjk-latex-kochi-mincho-vertical.png
Are you using the ntu fonts (ntu_kai.ttf , ntu_mr.ttf , ntu_li_m.ttf , free for you to use, but SuSE is not permitted to bundle them), or Arphic fonts? ntu fonts are Big5 encoded, so they can be converted to pfb font sets, which is nicer in Postscript or pdf then bitmapped ones generated by ttf2pk.
Whether fonts can be converted to pfb or not doesn't depend on whether they are Big5 fonts or not. All CJK TrueType fonts distributed with SuSE Linux can be easily converted to .pfb and used with CJK-LaTeX. Just call /usr/sbin/cjk-latex-config --type1 as root and wait a while[1]. After that, CJK-LaTeX will automatically use the created .pfb files. You can easily extend this for your own fonts, /usr/sbin/cjk-latex-config creates the .pfb files for all TrueType fonts installed in /usr/X11R6/lib/X11/fonts/truetype/ according to the entries in /etc/ttf2pk/ttfonts.map. I.e. if you have other TrueType fonts, just throw them into /usr/X11R6/lib/X11/fonts/truetype/, add entries to /etc/ttf2pk/ttfonts.map, and create .fd files in the appropriate subdirectory of /usr/share/texmf/tex/latex/CJK/. Then call '/usr/sbin/cjk-latex-config --type1'
I may look into this Chinese vertical issue as well in not so far future.
Footnotes:
[1] may be a long while, this can take several hours on a slow machine
if you have all available CJK TrueType fonts installed.
--
Mike Fabian
David Nettles
Mike Fabian wrote:
David Nettles
writes: * KWrite, KSpread, KMail - much of Japanese entered vanishes (eg. ??? would result in ??.... the ? would always disappear... same with many Kanji).
This works. Just choose suitable fonts.
Question #1: how would I choose an appropriate font? In KWord I selected the Mincho fonts and got no text at all.
Question #2: the problem that I am experiencing is disappearing text. The codes are not being passed through to the application's input it seems.
Japanese input in KWrite doesn't work with OnTheSpot input-style.
I.e. Japanese input in KWrite won't work when you do
kwrite --inputstyle onthespot &
but it will work when you do:
kwrite --inputstyle overthespot &
That is a known problem.
But I wonder why KSpread and KMail appear on your list
though. Certainly OnTheSpot input worked in KMail on SuSE Linux 8.0. I
tested that many times on many different machines.
On SuSE Linux 8.1:
onthespot overthespot root
konsole yes yes yes
KMail yes yes yes
KSpread yes yes yes
Kwrite no yes yes
KWord no yes yes
I believe this situation is unchanged since SuSE Linux 8.0.
Unfortunately the OntTheSpot input-style implementation in Qt3 is
still problematic for Japanese. Even for the application where
OnTheSpot sort of works, it is difficult to use some special
features. You might want to use OverTheSpot instead. See also:
http://www.suse.de/~mfabian/suse-cjk/kde-input-style.html
for how to change the global default.
Can you please verify whether it works for you if you switch to
OverTheSpot style?
--
Mike Fabian
David Nettles
Mike Fabian wrote:
David Nettles
writes: * KWrite, KSpread, KMail - much of Japanese entered vanishes (eg. ??? would result in ??.... the ? would always disappear... same with many Kanji).
This works. Just choose suitable fonts.
Question #1: how would I choose an appropriate font? In KWord I selected the Mincho fonts and got no text at all.
Question #2: the problem that I am experiencing is disappearing text. The codes are not being passed through to the application's input it seems.
To check whether the problem is only in the input or whether
you can't display Japanese at all in KWrite and KWord, please
try the following:
vsx0@gregory:~> export LC_ALL=ja_JP.UTF-8
vsx0@gregory:~> locale
LANG=ja_JP.UTF-8
LC_CTYPE="ja_JP.UTF-8"
LC_NUMERIC="ja_JP.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_COLLATE="ja_JP.UTF-8"
LC_MONETARY="ja_JP.UTF-8"
LC_MESSAGES="ja_JP.UTF-8"
LC_PAPER="ja_JP.UTF-8"
LC_NAME="ja_JP.UTF-8"
LC_ADDRESS="ja_JP.UTF-8"
LC_TELEPHONE="ja_JP.UTF-8"
LC_MEASUREMENT="ja_JP.UTF-8"
LC_IDENTIFICATION="ja_JP.UTF-8"
LC_ALL=ja_JP.UTF-8
vsx0@gregory:~> date
金 9月 13 13:21:27 CEST 2002
vsx0@gregory:~> date > test.txt
vsx0@gregory:~> kwrite test.txt &
vsx0@gregory:~> kword test.txt &
If you have usable font settings, KWord and KWrite should display the
Japanese output of 'date' correctly now.
--
Mike Fabian
Mike Fabian wrote:
Correct vertical variants of punctuation characters are used by CJK-LaTeX if the font used has a GSUB table for vertical context.
The free Japanese Kochi TrueType fonts have such a table, therefore it works perfectly with the Kochi fonts.
You can check whether such a GSUB table is available with 'ftdump':
ftdump /usr/X11R6/lib/X11/fonts/truetype/kochi-mincho.ttf
Thank you for this advice. (for other fonts I will continue with my hack of CJK with "rotate" inside)
Whether fonts can be converted to pfb or not doesn't depend on whether they are Big5 fonts or not.
All CJK TrueType fonts distributed with SuSE Linux can be easily converted to .pfb and used with CJK-LaTeX.
Which conversion programme are you calling here? Is it ttf2pfb, or ttf2pt1? Are the resulting pfb files in Unicode (up to 255 pfb files per font) or GB / Big5 / JIS? What about cyberbit.ttf? Does it generate all of Unicode, GB, Big5, and JIS automatically? Or which programme do I have to call to do all that manually, using which options? (When I looked into this last time, ttf2pfb could not do unicode->JIS or unicode->Big5 conversion, and ttf2pt1 had only some support for Chinese and none for Japanese. The vast majority of my fonts are free and non-free Chinese Big5, but also several non-free Japanese JIS and some Japanese Unicode based ones. The Kochi fonts are good, but I still like to have "kaisho" and "reisho" as well as some brush type "gyosho". Anyway, CJK on Linux has come a long way. My wife, who never touched computers until this year is happily working with SuSE 8.0 in Japanese setup. She uses mainly Mozilla, for mail and browsing, and it is working well. Only one question from her: How can we teach the Canna new vocabulary for Kana conversion? Does it have a user dictionary? And one question from me: How can I activate the Canna engine for Emacs (and XEmacs). Canna is much more powerful than the built in one of Mule. Thomas Piekenbrock with warm greeting from Tokyo.
Thomas Piekenbrock
Mike Fabian wrote:
Correct vertical variants of punctuation characters are used by CJK-LaTeX if the font used has a GSUB table for vertical context.
The free Japanese Kochi TrueType fonts have such a table, therefore it works perfectly with the Kochi fonts.
You can check whether such a GSUB table is available with 'ftdump':
ftdump /usr/X11R6/lib/X11/fonts/truetype/kochi-mincho.ttf
Thank you for this advice. (for other fonts I will continue with my hack of CJK with "rotate" inside)
Whether fonts can be converted to pfb or not doesn't depend on whether they are Big5 fonts or not.
All CJK TrueType fonts distributed with SuSE Linux can be easily converted to .pfb and used with CJK-LaTeX.
Which conversion programme are you calling here? Is it ttf2pfb, or ttf2pt1?
'ttf2pt1' is used by '/usr/sbin/cjk-latex-config --type1'.
Are the resulting pfb files in Unicode (up to 255 pfb files per font) or GB / Big5 / JIS?
As you like. Whatever is written in /etc/ttf2pk/ttfonts.map is generated. For example, for the free Japanese TrueType fonts Kochi Mincho and Kochi Gothic I have the following entries in /etc/ttf2pk/ttfonts.map: kochimin@UJIS@ kochi-mincho.ttf kochimins@UJIS@ kochi-mincho.ttf Slant=0.167 kochiminr@UJIS@ kochi-mincho.ttf Rotate=Yes kochiminrs@UJIS@ kochi-mincho.ttf Slant=0.167 Rotate=Yes kochigo@UJIS@ kochi-gothic.ttf kochigos@UJIS@ kochi-gothic.ttf Slant=0.167 kochigor@UJIS@ kochi-gothic.ttf Rotate=Yes kochigors@UJIS@ kochi-gothic.ttf Slant=0.167 Rotate=Yes kochimin-uni@Unicode@ kochi-mincho.ttf kochimins-uni@Unicode@ kochi-mincho.ttf Slant=0.167 kochiminr-uni@Unicode@ kochi-mincho.ttf Rotate=Yes kochiminrs-uni@Unicode@ kochi-mincho.ttf Slant=0.167 Rotate=Yes kochigo-uni@Unicode@ kochi-gothic.ttf kochigos-uni@Unicode@ kochi-gothic.ttf Slant=0.167 kochigor-uni@Unicode@ kochi-gothic.ttf Rotate=Yes kochigors-uni@Unicode@ kochi-gothic.ttf Slant=0.167 Rotate=Yes Then, '/usr/sbin/cjk-latex-config --type1' will generate the following .pfb fonts: /usr/share/texmf/fonts/type1/cjk-latex/UJIS/kochigo/kochigo01.pfb [...] kochigo35.pfb /usr/share/texmf/fonts/type1/cjk-latex/UJIS/kochigo/kochimin01.pfb [...] kochimin35.pfb /usr/share/texmf/fonts/type1/cjk-latex/Unicode/kochigo-uni/kochigo-uni00.pfb [...] kochigo-uniff.pfb /usr/share/texmf/fonts/type1/cjk-latex/Unicode/kochimin-uni/kochimin-uni00.pfb [...] kochimin-uniff.pfb I.e. it will generate 255 .pfb files for the Unicode encoding and fewer for GB, Big5, JIS. Note that no .pfb files are created for the slanted and no rotated variants. I.e. you cannot use .pfb files for slanted or vertical text. That is because ttf2pt1 currently doesn't support slanting and rotating. As soon as it supported by ttf2pt1, I'll add that.
What about cyberbit.ttf?
For cyberbit.ttf, /etc/ttf2pk/ttfonts.map currently contains: cyberb@Unicode@ cyberbit.ttf cyberbs@Unicode@ cyberbit.ttf Slant=0.167 cyberbr@Unicode@ cyberbit.ttf Rotate=Yes cyberbrs@Unicode@ cyberbit.ttf Rotate=Yes Slant=0.167 I.e. currently it will only generate Unicode for cyberbit.ttf.
Does it generate all of Unicode, GB, Big5, and JIS automatically? Or which programme do I have to call to do all that manually, using which options?
If you are using cyberbit.ttf in Big5, you need to have entries in /etc/ttf2pk/ttfonts.map referencing cyberbit.ttf in Big5, for example cyberb-big5@UBig5@ cyberbit.ttf cyberbs-big5@UBig5@ cyberbit.ttf Slant=0.167 cyberbr-big5@UBig5@ cyberbit.ttf Rotate=Yes cyberbrs-big5@UBig5@ cyberbit.ttf Rotate=Yes Slant=0.167 and some .fd files like /usr/share/texmf/tex/latex/CJK/Bg5/c00????.fd which declare font families using the font file names cyberb-big5, cyberbs-big5, cyberbr-big5, cyberbrs-big5. If you are already using cyberbit in Big5 as .pk fonts, you must already have all that, otherwise if wouldn't yet work for the .pk fonts. Then just call '/usr/sbin/cjk-latex-config --type1' and .pfb fonts matching your entries in /etc/ttf2pk/ttfonts.map will be generated, i.e. in case of the above example, /usr/share/texmf/fonts/type1/cjk-latex/UBig5/cyberb-big5/cyberb-big501.pfb [...] cyberb-big558.pfb will be generated. If you are already using some fonts as .pk fonts, you only need to call /usr/sbin/cjk-latex-config --type1 then the matching .pfb fonts will be generated, a map-file /var/lib/texmf/dvips/config/cjk-latex.map will be generated and entries to use that map-file will be automatically added to /var/lib/texmf/pdftex/config/pdftex.cfg /var/lib/texmf/dvips/config/config.ps I.e. if you are already using fonts as .pk fonts, just call /usr/sbin/cjk-latex-config --type1 and from then on you can use the fonts as .pfb fonts. That's easy, isn't it? This feature exists since SuSE Linux 8.0, but I didn't yet find time to document it properly.
(When I looked into this last time, ttf2pfb could not do unicode->JIS or unicode->Big5 conversion, and ttf2pt1 had only some support for Chinese and none for Japanese.
Actually ttf2pt1 doesn't really care whether Japanese or Chinese fonts are used. It just generates .pfb files containing glyphs according to glyph-lists in map-files like /usr/share/ttf2pt1/maps/cubig5.map it's true that ttf2pt1 only comes with map-files for Chinese, but that doesn't matter, I don't use the map-files distributed with ttf2pt1 anyway. What one really wants to use are the map-files distributed with ttf2tfm, like /usr/share/texmf/ttf2tfm/UBig5.sfd because these are used to create the .tfm and the .pk files. And you want your generated .pfb files contain exactly the same glyphs as those in the respective .tfm and .pk files. Otherwise you would get wrong glyphs when using the .pfb files. I.e. I need to make ttf2pt1 use the .sfd files from ttf2tfm. Unfortunately ttf2pt1 expects .map files in a slightly different format than the .sfd files from ttf2tfm. Very similar, but a little bit different. Therefore, my /usr/sbin/cjk-latex-config creates temporary .map files from the .sdf files and feeds these into ttf2pt1.
The vast majority of my fonts are free and non-free Chinese Big5, but also several non-free Japanese JIS and some Japanese Unicode based ones. The Kochi fonts are good, but I still like to have "kaisho" and "reisho" as well as some brush type "gyosho".
With the SuSE CJK-LaTeX package, just try
/usr/sbin/cjk-latex-config --type1
and you should be able to use most of your fonts as .pfb.
That should save a lot of work compared to doing the conversion
manually.
ttf2pt1 can handle some fonts only with smoothing of outlines disabled
and cannot handle some fonts at all. Probably this indicates that
there is something broken in the fonts. My /usr/sbin/cjk-latex-config
script contains exeptions for such fonts, for example if it
detects wadalab-gothic.ttf and watanabe-mincho.ttf it skips them
if (grep(/$tt_basename/,("wadalab-gothic.ttf","watanabe-mincho.ttf"))) {
print "$tt_basename does not work with ttf2pt1, skipping ...\n";
return 0;
}
these two fonts are very broken. And it disables outline smoothing for
Kochi Gothic, otherwise ttf2pt1 would segfault when processing
Kochi Gothic:
if (grep(/$tt_basename/,("kochi-gothic.ttf"))) {
print "$tt_basename broken, disabling smoothing of outlines.\n";
$smoothing_opt = " -O s ";
}
If you have broken fonts, you may need to make these exeption lists a
bit longer, or uncomment the bad fonts in /etc/ttf2pk/ttfonts.map
before running
/usr/sbin/cjk-latex-config --type1
But for good fonts you should not need to do anything.
I would appreciate if you test my automated type1 generation for
CJK-LaTeX a bit.
Suggestions for improvements are very welcome.
--
Mike Fabian
Thomas Piekenbrock
Anyway, CJK on Linux has come a long way. My wife, who never touched computers until this year is happily working with SuSE 8.0 in Japanese setup. She uses mainly Mozilla, for mail and browsing, and it is working well. Only one question from her: How can we teach the Canna new vocabulary for Kana conversion? Does it have a user dictionary?
Yes, see
http://www.suse.de/~mfabian/suse-cjk/kinput2-canna-add-del-dic.html
for how to add words to the canna user dictionary when using kinput2.
When using XEmacs, use the functions
b* canna-touroku - Register a word into a kana-to-kanji dictionary.
b* canna-touroku-region - Register a word in the selected region into a kana-to-kanji dictionary.
Canna also comes with some commandline tools to add/delete words
in dictionaries. See the manpages
lsdic(1), mkdic(1), mvdic(1), rmdic(1), addwords(1), delwords(1),
splitword(1) dicar(1)
--
Mike Fabian
Thomas Piekenbrock
And one question from me: How can I activate the Canna engine for Emacs (and XEmacs). Canna is much more powerful than the built in one of Mule.
XEmacs:
M-x set-input-method RET japanese-canna RET
see also:
http://www.suse.de/~mfabian/suse-cjk/xemacs-non-xim-input-method.html
Emacs:
Install
ftp://ftp.suse.com/pub/suse/i386/8.0/suse/j2/tamago-4.0.6_20011017cvs-192.noarch.rpm
and then:
M-x set-input-method RET japanese-egg-canna RET
See also
http://www.suse.de/~mfabian/suse-cjk/emacs-and-xemacs.html
how to set some useful defaults for XEmacs and Emacs.
--
Mike Fabian
Hi Thomas and Mike, thanks for the great support. Rotation of the rubies is one problem. The other problem with the rubies for the bo-po-mo-fo system is that the tone symbols (which you don't have in japanses) must be added to the right of the pronounciation symbols. I.e. there are two rows of rubies. I tried it using embedded rubies in latex: \ruby{hanzi}{\ruby{pronounciation}{tone}} but the positioning needs to be improved. Maybe Thomas' hack is the only solution for that at the moment. I will try to find out what SW is used in Taiwan to do this. Thanks for the help, Stefan Thomas, could you send me your hack, please? Mike Fabian wrote:
Thomas Piekenbrock
writes: I had the same problem with Japanese. There is supposed to be a vertical style option somewhere in CJK, but I do not know how good it is.
I have been using CJK for 6 years, and I am using my old version, not the package from SuSE. I did a hack on the CJK code, which optionally rotates all Characters by 270 degrees, including ruby. Doing so, the ruby appear automatically on the right side of the Chinese Character. The hack includes some adjustments for placement of punctuation characters, because some may not be rotated, and others must be moved a bit.
Correct vertical variants of punctuation characters are used by CJK-LaTeX if the font used has a GSUB table for vertical context.
The free Japanese Kochi TrueType fonts have such a table, therefore it works perfectly with the Kochi fonts.
You can check whether such a GSUB table is available with 'ftdump':
ftdump /usr/X11R6/lib/X11/fonts/truetype/kochi-mincho.ttf [...] GSUB table ------------------------------------------------------------------------------
script `kana' (index 0): default language system: feature `vert' (index 0; lookup 0) language `JAN ' (index 0): feature `vert' (index 0; lookup 0)
Lookups:
0: type 1, flag 0x1
------------------------------------------------------------------------------
The free Chinese Arphic TrueType fonts don't have such a GSUB table, therefore punctuation characters don't work perfectly in vertical mode with the Arphic fonts. But this is just a font problem, as soon as you have fonts with a good GSUB table for this purpose, it works.
See this screenshot:
http://www.suse.de/~mfabian/m17n/cjk-latex-kochi-mincho-vertical.png
Are you using the ntu fonts (ntu_kai.ttf , ntu_mr.ttf , ntu_li_m.ttf , free for you to use, but SuSE is not permitted to bundle them), or Arphic fonts? ntu fonts are Big5 encoded, so they can be converted to pfb font sets, which is nicer in Postscript or pdf then bitmapped ones generated by ttf2pk.
Whether fonts can be converted to pfb or not doesn't depend on whether they are Big5 fonts or not.
All CJK TrueType fonts distributed with SuSE Linux can be easily converted to .pfb and used with CJK-LaTeX.
Just call
/usr/sbin/cjk-latex-config --type1
as root and wait a while[1]. After that, CJK-LaTeX will automatically use the created .pfb files.
You can easily extend this for your own fonts, /usr/sbin/cjk-latex-config creates the .pfb files for all TrueType fonts installed in /usr/X11R6/lib/X11/fonts/truetype/ according to the entries in /etc/ttf2pk/ttfonts.map.
I.e. if you have other TrueType fonts, just throw them into /usr/X11R6/lib/X11/fonts/truetype/, add entries to /etc/ttf2pk/ttfonts.map, and create .fd files in the appropriate subdirectory of /usr/share/texmf/tex/latex/CJK/.
Then call '/usr/sbin/cjk-latex-config --type1'
I may look into this Chinese vertical issue as well in not so far future.
Footnotes: [1] may be a long while, this can take several hours on a slow machine if you have all available CJK TrueType fonts installed.
Stefan Friedrich
Hi Thomas and Mike,
thanks for the great support. Rotation of the rubies is one problem. The other problem with the rubies for the bo-po-mo-fo system is that the tone symbols (which you don't have in japanses) must be added to the right of the pronounciation symbols. I.e. there are two rows of rubies. I tried it using embedded rubies in latex:
\ruby{hanzi}{\ruby{pronounciation}{tone}}
but the positioning needs to be improved.
You have already played with the \rubysize and \rubysep variables?
\renewcommand{\rubysize}{0.4}
\renewcommand{\rubysep}{-0.1ex}
If that isn't enough, you can try to improve
/usr/share/texmf/tex/latex/CJK/ruby.sty
--
Mike Fabian
participants (4)
-
David Nettles
-
Mike Fabian
-
Stefan Friedrich
-
Thomas Piekenbrock