Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40354 - cjk-latex unable to deal with font size other than 10pt. xdvi and dvips have mktexpk report that it doesn't "know how to create bitmap font".
Summary: cjk-latex unable to deal with font size other than 10pt. xdvi and dvips have ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: TeX project
URL:
Whiteboard:
Keywords:
: 48194 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-04 00:54 UTC by Willie Wong
Modified: 2007-11-11 09:23 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cjk-latex-4.6.0.ebuild (cjk-latex-4.6.0.ebuild,3.57 KB, text/plain)
2005-09-16 18:30 UTC, Jie Luo
Details
cjk-latex-4.5.2.ebuild (cjk-latex-4.5.2.ebuild,3.10 KB, text/plain)
2005-09-18 00:14 UTC, Jie Luo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Willie Wong 2004-02-04 00:54:57 UTC
When trying to type set Chinese text with cjk-latex, the tex file compiles fine, but xdvi and dvips has trouble dealing with the document if the font is set to anything other than 10pt. And even with 10pt font, the output document has the Chinese characters only half the size of the English letters. 

I found the following:
1. The reason that mktexpk fails is because that 
  a) The ttf fonts were not installed
  b) The hbf fonts were installed poorly, since the installation only provides the hbf fonts, but not the config files required to run hbf2gf, mktexpk cannot generated dynamically the required bitmaps. 
  c) However, the hbf fonts and config files are both included in the cjk-latex-fonts tarball downloaded. So the ebuild initially generates the pk fonts at only 500dpi (which corresponds to latex's 10pt size font). The 500dpi fonts get installed, and because of their presence, kpathsea finds no need to try to regenerate the fonts, so the 10pt font would work. For other sizes, the 600dpi corresponding to the 12pt and 720dpi corresponding to the 14.4pt fonts were not present, and when kpathsea calls mktexpk to generate the fonts, it finds that i) the fonts were not generated from type1/postscript fonts ii) that ttf fonts are not available, and iii) hbf2gf is missing a config file. And it quits. 

2. An attempt to install truetype fonts to the system reveals that ttf2tfm, ttf2pk, and its family of tools were not installed properly. ttf2pk should come with a selection of subfont definitions for the CJK encodings in the form of Big5.sfd, GB.sfd, UBig5.sfd, etc... The bug would've been minor with the sfd files included, or the config files mentioned in 1b) installed. In that case, it is possible to manually generate all the fonts at the required resolutions by hbf2gf and/or ttf2tfm + ttf2pk. But the lack of those files made the solution dependent on the location of several not-so-easy to find files. 

3. Perhaps should try to provide truetype instead of hbf fonts initially. 

Reproducible: Always
Steps to Reproduce:
1. install tetex, cjk-latex
2. create test file like the following:
test.tex
-------------------
\documentclass[12pt]{article}
\usepackage{CJK}
\begin{document}
\begin{CJK}{Bg5}{kai}
<insert some chinese text here>
\end{CJK}
\end{document}
----------------------------
3. run latex test
4. run xdvi test

Actual Results:  
xdvi spat out

> kpathsea: Running mktexpk --mfmode ljfour --bdpi 600 --mag 1+120/600 --dpi 720
+b5kai10                                                                        
> mktexpk: don't know how to create bitmap font for b5kai10.                    
> kpathsea: Appending font creation commands to missfont.log.                   
> dvips: Font b5kai10 not found,  using cmr10 instead.                          
> dvips: Checksum mismatch in font b5kai10                                      
> kpathsea: Running mktexpk --mfmode ljfour --bdpi 600 --mag 1+120/600 --dpi 720
+b5kai13                                                                        
> mktexpk: don't know how to create bitmap font for b5kai13.                    
> dvips: Font b5kai13 not found,  using cmr10 instead.                          
> dvips: Checksum mismatch in font b5kai13 

substituted some radom characters from computer modern for the chinese
characters, and dies. 

Expected Results:  
shown an xdvi preview window with the chinese characters specified in test.tex
printed. 

tetex 2.0.2-r4
cjk-latex 4.5.2
Comment 1 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-02-04 06:20:23 UTC
Thanks for the helpful comment. Could you provide (an) ebuild(s) 
to fix the problem(s)? (I don't have much time to look at it atm, sorry)
Comment 2 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-04-18 12:20:31 UTC
*** Bug 48194 has been marked as a duplicate of this bug. ***
Comment 3 Josh Glover (RETIRED) gentoo-dev 2004-05-15 05:12:30 UTC
I will take a look at this, usata-san.
Comment 4 Jackey Yang ("timeout" in forum) 2004-11-11 06:06:44 UTC
Go to http://www.magiclinux.org/cgi-bin/viewcvs.cgi
download latest chinese portage, then emerge gbkfonts-linux, 
which help you setup all chinese latex environment automatically.
cjk-lyx crashed at the beginning of init, i do not know why, all 
i can do is rm ~/.lyx and start it. 

Chinese Gentoo Linux site
http://gentoo.linuxsir.org
Comment 5 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-11-13 04:16:47 UTC
Jackey, I said I'll look into and add your ebuild this weekend,
but after I read it I thought it'll take longer than I expected
(I'd like to find smarter way to handle fonts installation in
that ebuild). Sorry for that.
Comment 6 Jackey Yang ("timeout" in forum) 2004-11-13 21:05:38 UTC
Mamoru, i do not quite get what are you talking about. 
Are you talking about cjk-lyx ebuild or gbkfonts-linux ebuild.
If you are talking about gbkfonts-linux, just forget about it and 
don't even bother to add into portage. Because it is not an 
"qualified" ebuild at all (just a hack *^_^*,but works though).
My point is that you may be able to use the binary gbkfonts-linux 
program to deal with Janpanese or Korean TTF fonts. If that is the
case, then we can put this on our table and create an ebuild for
all of us.

BTW, cjk-lyx does crash after first launch, i do not know why, 
cjk-lyx debug is not very helpful neither, but i do know there is
something related to TTF fonts. This very strange, it only happens
on Gentoo, I built it on Magic Linux(RPM based Linux), there is
nothing wrong.

Anyway, thx for your reply so quickly. Let us keep communication like
this, so we can build a better cjk solution. 
Comment 7 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-11-13 23:54:56 UTC
I was talking about gbkfonts-linux package 
you created. I left cjk-lyx (and cjk-latex) to 
jmglov, but I'll fix cjk-latex (not cjk-lyx) if 
someone has a patch to fix it. I will not add 
cjk-lyx even if someone qualifies that the 
ebuild works (or has a patch to get it work), 
just because I cannot afford fixing bugs
related to cjk-lyx (lyx itself has three open
bugs).

If there is somebody
in cjk or text-markup herd interested in 
adding it, feel free to do so.
Comment 8 Dan Elharrar 2005-05-30 00:42:23 UTC
So... is there any temporary solution that can help typeset CJK in any size
other than 10pt, until the new ebuilds are ready?
Comment 9 Jackey Yang ("timeout" in forum) 2005-05-30 08:07:50 UTC
Dan,
Answer is Yes or No, I can make sure that Simplifed Chinese with GBK encoding is
fine, but I can not tell that Japanese and Korean are fine. From my personal
experience, it should be fine.

I am trying to rebuild an overlay portage like www.gentoo.de, so people can use
gentoo-dev-kits to emerge the customized portage for Chinese users. But I had to
make living first, hope I can have enough spare time to work on this project.
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2005-08-06 02:50:33 UTC
Re-assigning the bug, the assignee has retired.
Comment 11 Jie Luo 2005-09-16 18:28:18 UTC
This bug is caused by the missing of hbf2gf config file and the path of
MISCFONTS in texmf/web2c/texmf.cnf is not include texmf/fonts/hbf, so mktexpk
can't create pk fonts for b2ka12. But I don't think it is a good idea to modify
texmf/web2c/texmf.cnf, so I make texmf/font/misc, which is included in
MISCFONTS's path, a symbol link to texmf/font/hbf. Do this will make the
'mktexpk: don't know how to create bitmap font for b5kai10.' problem to be
resolved, but the characters is poorly displayed because the font kai is bitmap
font. Install other CJK Type1 fonts from CTAN will be a good idea, I'll try to
do it.
Comment 12 Jie Luo 2005-09-16 18:30:42 UTC
Created attachment 68629 [details]
cjk-latex-4.6.0.ebuild

This is the modified ebuild.
Comment 13 Jie Luo 2005-09-18 00:14:32 UTC
Created attachment 68716 [details]
cjk-latex-4.5.2.ebuild

Don't use symbol link, directly install hbf fonts into texmf/fonts/misc for
hbf2gf looking hbf fonts in this dir.
Comment 14 Alexis Ballier gentoo-dev 2007-11-11 09:23:14 UTC
should be fixed with 4.7.0