dvipdfmx need CMap files to make the text exacting of PDF work correctly for CJK language. In previous version of dvipdfmx ebuild, this is done by link the Resource file of ghostscript to texmf/font/cmap/ghostscript. There are several sources of CMap files in the portage, ghostscript, poppler-data, xpdf and acroread. CMap files in acroread are only allowed to use inside, so it is not the right source of CMap files for dvipdfmx. ghostscript and xpdf are to heavy to depend on. A better solution is the poppler-data, it only contains CMap files. So what we need to do is add poppler-data as runtime dependent, and link /usr/share/poppler/cMap to /usr/share/texmf/fonts/cmap/cMap. And another suggestion to app-text/dvipdfm(x) is that move the real config file to /etc/texmf, and make a symbol link to /usr/share/texmf as other package does. For example, install dvipdfmx.cfg to /etc/texmf/dvipdfm and link it to /usr/share/texmf/dvipdfm/dvipdfmx.cfg. This will make the configuration of these two package much easier. Otherwise as their config file are not being protected, you have to reconfig every time you update. Reproducible: Always Steps to Reproduce: 1. dvipdfmx file.dvi (contain Chinese GBK char) 2. Actual Results: file.dvi -> file.pdf [1 ** ERROR ** Could not find encoding file "UniGB-UCS2-H". Output file removed.
thanks all those suggestions are very good, I'll make a -r1 incorporating them. However, do you have sample dvi/tex files that trigger the cmap problem ? with all what I've tried, I couldnt get this failure :/
In order to reproduce this problem, you need first install texlive-langcjk and cjk-latex. This can be done by USE="cjk" emerge texlive. You need to install media-fonts/arphicfonts for truetype fonts. Add the following line to cid-x.map file. gbsnlp@EUC@ GB-EUC-H gbsn00lp Then you can use the test.tex in the attachment to produce test.dvi. This problem can be produced by `dvipdfmx test.dvi.' test.dvi -> test.pdf [1 ** ERROR ** Could not find encoding file "GB-EUC-H". Output file removed.
Created attachment 137853 [details] The example tex file
(In reply to comment #2) > In order to reproduce this problem, you need first install texlive-langcjk and > cjk-latex. This can be done by USE="cjk" emerge texlive. You need to install > media-fonts/arphicfonts for truetype fonts. Add the following line to cid-x.map > file. If you install arphicfonts after you install texlive, I think you'd better update the ls-R by mktexlsr. > > gbsnlp@EUC@ GB-EUC-H gbsn00lp > > Then you can use the test.tex in the attachment to produce test.dvi. This > problem can be produced by `dvipdfmx test.dvi.' > > test.dvi -> test.pdf > [1 > ** ERROR ** Could not find encoding file "GB-EUC-H". > > Output file removed. >
should be fixed in -r1 thanks a lot for your help ! please continue to suggest such improvements for tex stuff because unfortunately my asian language knowledge is very limited or inexistant.