Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 40354
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: TeX herd <tex@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Willie Wong <wwong@princeton.edu>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
cjk-latex-4.6.0.ebuild cjk-latex-4.6.0.ebuild text/plain Jie Luo 2005-09-16 18:30 0000 3.57 KB Details
cjk-latex-4.5.2.ebuild cjk-latex-4.5.2.ebuild text/plain Jie Luo 2005-09-18 00:14 0000 3.10 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 40354 depends on: Show dependency tree
Bug 40354 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-02-04 00:54 0000
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 From Mamoru KOMACHI (RETIRED) 2004-02-04 06:20:23 0000 -------
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 From Mamoru KOMACHI (RETIRED) 2004-04-18 12:20:31 0000 -------
*** Bug 48194 has been marked as a duplicate of this bug. ***

------- Comment #3 From Josh Glover (RETIRED) 2004-05-15 05:12:30 0000 -------
I will take a look at this, usata-san.

------- Comment #4 From Jackey Yang ("timeout" in forum) 2004-11-11 06:06:44 0000 -------
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 From Mamoru KOMACHI (RETIRED) 2004-11-13 04:16:47 0000 -------
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 From Jackey Yang ("timeout" in forum) 2004-11-13 21:05:38 0000 -------
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 From Mamoru KOMACHI (RETIRED) 2004-11-13 23:54:56 0000 -------
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 From Dan Elharrar 2005-05-30 00:42:23 0000 -------
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 From Jackey Yang ("timeout" in forum) 2005-05-30 08:07:50 0000 -------
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 From Jakub Moc (RETIRED) 2005-08-06 02:50:33 0000 -------
Re-assigning the bug, the assignee has retired.

------- Comment #11 From Jie Luo 2005-09-16 18:28:18 0000 -------
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 From Jie Luo 2005-09-16 18:30:42 0000 -------
Created an attachment (id=68629) [details]
cjk-latex-4.6.0.ebuild

This is the modified ebuild.

------- Comment #13 From Jie Luo 2005-09-18 00:14:32 0000 -------
Created an attachment (id=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 From Alexis Ballier 2007-11-11 09:23:14 0000 -------
should be fixed with 4.7.0

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug