[While the mailing list archive is down I can't search for previous answers to this, so apologies if this is asked and answered already.]
I'd like to use the Chinese setting facility in ConTeXt, and am going through the instructions given in the "Chinese in ConTeXt" manual. I'm finding it very tough to locate the utilites needed to prepare the fonts.
the fontutil can be download from http://learn.tsinghua.edu.cn/homepage/015450/prog.html there are windows/linux/solaris version and the name is gbkfonts now. I think you can read this chinese web page.
In particular, I've been looking for 'chpfb' or 'gbpfb', which will enable me to convert a TrueType font into several Type 1 fonts and corresponding tfms, or the 'gbenc' shellscript which will enable me to create the necessary tfms and encodings to use the ttf directly.
Unfortunately they are proving very difficult to track down in the locations pointed to by the manual, which presumably are now out of date.
I have access to both Windows and Linux platforms to run these on, so if anyone can point me at a place where I can now get them I'd be very grateful. Even better, if someone actually has a working Chinese set-up, a few pointers as to how you got there would be brilliant!
there are a simple setup for chinese in context here: http://bbs.ctex.org/cgi-bin/topic.cgi?forum=8&topic=28&show=90 also a chinese page. Wang
the fontutil can be download from http://learn.tsinghua.edu.cn/homepage/015450/prog.html there are windows/linux/solaris version and the name is gbkfonts now. I think you can read this chinese web page.
Thank you very much, this solved the initial problem. (I'm not able to read Chinese but Babelfish helped me understand what everything meant.)
there are a simple setup for chinese in context here: http://bbs.ctex.org/cgi-bin/topic.cgi?forum=8&topic=28&show=90 also a chinese page.
Again very useful, thank you very much. I now have reached the following stage: I have the htsong.ttf TrueType font, a set of .tfm files generated from it, and a set of .enc files to tie them together. I have added them all to my texmf tree, along with the various recommended edits to the context/base files, the .map files and so on. I ran texec --make and texhash without any problem. When I texexec a very small sample ConTeXt seems to be looking for a different naming scheme for the files. I have generated a set of files called gbsong01.tfm gbsong02.tfm ... gbsong94.tfm gbsongsl01.tfm ... gbsongsl94.tfm but ConTeXt seems to rely on them being called gbsong81.tfm ... gbsongfe.tfm and suchlike. I get lots of errors saying that the tfm files can't be found, and then it starts trying to generate fonts using metafont, which is never going to work... Do I have to rename these files, or is there somewhere that I can edit to change this dependency, or is my guess wrong and I actually have a different problem? Thanks very much. I have never used a TTF directly with pdftex before, I hope it will work. Duncan
there are a simple setup for chinese in context here: http://bbs.ctex.org/cgi-bin/topic.cgi?forum=8&topic=28&show=90 also a chinese page.
Again very useful, thank you very much. I now have reached the following stage: When I texexec a very small sample ConTeXt seems to be looking for a different naming scheme for the files. I have generated a set of files called
gbsong01.tfm gbsong02.tfm ... gbsong94.tfm gbsongsl01.tfm ... gbsongsl94.tfm
but ConTeXt seems to rely on them being called
gbsong81.tfm ... gbsongfe.tfm
and suchlike. I get lots of errors saying that the tfm files can't be found, and then it starts trying to generate fonts using metafont, which is never going to work... Do I have to rename these files, or is there somewhere that I can edit to change this dependency, or is my guess wrong and I actually have a different problem?
You should not rename those files. The subfonts you generated is called CJK compact and each subfont have 256 glyphs. I think you may miss something when you reading the web page about setups in context. now you can do following steps: first, edit tex/context/base/font-uni.tex, comment out the following line: \defineucharmapping{GBK}#1#2% {\unicodeposition=#1 \advance\unicodeposition -129 \multiply\unicodeposition 190 \advance\unicodeposition #2 \advance\unicodeposition-\ifnum#2>127 65\else64\fi \dorepositionunicode} Or you can add these code to your cont-usr.tex. Then when you write tex files, add \def\currentucharmapping{GBK} before you using chinese. Or conveniently, put this command to your cont-usr.tex too. Wang
I think you may miss something when you reading the web page about setups in context. now you can do following steps: first, edit tex/context/base/font-uni.tex, comment out the following line: \defineucharmapping{GBK}#1#2% {\unicodeposition=#1 \advance\unicodeposition -129 \multiply\unicodeposition 190 \advance\unicodeposition #2 \advance\unicodeposition-\ifnum#2>127 65\else64\fi \dorepositionunicode}
Or you can add these code to your cont-usr.tex.
Then when you write tex files, add \def\currentucharmapping{GBK} before you using chinese. Or conveniently, put this command to your cont-usr.tex too.
Actually I already put both of these into cont-usr.tex and it had no effect. But when I put these directly into my sample document it helped. It must be something about my set-up which isn't reading my cont-usr.tex file either on format creation or at run-time. I will look into it. Anyway, with these in my document I then ran into one final problem, which I was able to solve myself - the font definitions in font-chi.tex were mapping to things like gbsong and gbhei, whereas the new generation utilities create tfms and encodings called gbksong and gbkhei (i.e. an extra 'k'). Replacing the references in font-chi.tex solved that problem and I am now able to typeset beautiful Simplified Chinese glyphs! (I'm not clear whether this should be classed as a bug in font-chi.tex, since you can also change the naming in the generation utilities.) Thanks for all your help so far, it's looking good. I'm sure I will have more queries from now on! Duncan
participants (2)
-
Duncan Hothersall
-
Lei Wang