2009/5/12 Hans Hagen <pra...@wxs.nl>: > Yanrui Li wrote: >> >> Hi Hans, >> >> I tried to use Chinese opentype fonts with luatex + plain fmt but I >> failed. Only with Chinese TTF fonts it can work. >> >> This a simple example: >> >> \pdfoutput=1 >> \font\myfont=AdobeSongStd-Light >> >> \myfont >> 我想实现 LuaTeX 对中文的支持 >> >> \end >> >> When I compiled it, I got the following messages: >> >> This is LuaTeX, Version beta-0.41.0-2009051221 (Web2C 7.5.7) >> \write18 enabled. >> (tt.tex (luatex-basics.tex) (luatex-fonts.tex <luatex-fonts-merged.lua> >> <luatex >> -fonts.lua loaded in 0.027 seconds>) (luatex-mplib.tex) >> LuaTeX warning: lua-loaded font [51] >> (/usr/share/fonts/adobe/AdobeSongStd-Light >> .otf) has no characters! >> [1{/opt/context/tex/texmf/fonts/map/pdftex/plain/pdftex.map}] >> ){/opt/context/te >> >> x/texmf/fonts/enc/dvips/lm/lm-rep-cmrm.enc}</opt/context/tex/texmf/fonts/type1/ >> public/lm/lmr10.pfb> >> Output written on tt.pdf (1 page, 17128 bytes). >> Transcript written on tt.log. > > this is because a cidmap is needed and the kpse that you use does not have > it; upcoming versions of kpse (and luatex's kpse lib) will support it given > that you also adapted your texmf.cnf accordingly then > > so a bit patience is needed >
Yes, that is a source of problem; more obstacles, however, are waiting for us. 1. To test an cid-keyed opentype fonts, I have copied *.cidmap files into current directory and processed a simple document with luatex-plain. But it did not work: This is LuaTeX, Version beta-0.40.1-2009050920 (Web2C 7.5.7) \write18 enabled. (nanumotf.tex (/media/disk/context/tex/texmf-context/tex/generic/context/luatex-basics.tex) (/media/disk/context/tex/texmf-context/tex/generic/context/luatex-fonts.tex <lu atex-fonts-merged.lua> <luatex-fonts.lua loaded in 0.027 seconds>) (/media/disk/context/tex/texmf-context/tex/generic/context/luatex-mplib.tex) LuaTeX warning: lua-loaded font [51] (/media/disk/context/tex/texmf-local/fonts /opentype/korean/NanumGothic.otf) has no characters! The same message as that of Li Yanrui's experiment, which would not occur on windows machine. But I am on my linux box, whose file system, as you know, distinguishs upper- and lower-case letters: Adobe-Korea1-2.cidmap is quite different from adobe-korea1-2.cidmap. So I added one line into luatex-fonts-merged.lua as follows: --- ../tex/texmf-context/tex/generic/context/luatex-fonts-merged.lua 2009-05-12 18:29:55.000000000 +0900 +++ luatex-fonts-merged.lua 2009-05-13 01:14:55.000000000 +0900 @@ -3898,6 +3898,7 @@ local function locate(registry,ordering,supplement) local filename = format(template,registry,ordering,supplement) + filename = string.lower(filename) local cidmap = fonts.cid.map[filename] if not cidmap then if trace_loading then 2. However, I still got an error even after that one-line patch: This is LuaTeX, Version beta-0.40.1-2009050920 (Web2C 7.5.7) \write18 enabled. (nanumotf.tex (/media/disk/context/tex/texmf-context/tex/generic/context/luatex-basics.tex) (/media/disk/context/tex/texmf-context/tex/generic/context/luatex-fonts.tex <lu atex-fonts-merged.lua> <luatex-fonts.lua loaded in 0.029 seconds>) (/media/disk/context/tex/texmf-context/tex/generic/context/luatex-mplib.tex) ! LuaTeX error ./luatex-fonts-merged.lua:3879: attempt to call field 'loaddata' (a nil value). In other words, loaddata is not defined. So I issued "grep" command, which helped me finding "io.loaddata" function defined in l-io.lua. In sum: even after modification of kpse, two more problems should be fixed. 1. lowering uppercase filename before searching cidmap 2. including l-io.lua into luatex-plain Regards, Dohyun Kim ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________