Problem
When compliing a .tex file which include Japanese letter with uplatex and dvipdfmx, dvipdfmx threws an error like:
name = uprml-h, rootname = uprml-h, pointsize =
mktexmf: empty or non-existent rootfile!
kpathsea: Running mktexmf uprml-h.mf
The command name is C:\texlive\2021\bin\win32\mktexmf
Cannot find uprml-h.mf .
I try ps2pk --> gsftopk --> ttf2pk --> hbf2gf.
Current font seems to be a Japanese one.
I give up to create a PK font.
dvipdfmx: warning: Couldn't open font map file "pdftex.map".
dvipdfmx: warning: Couldn't open font map file "kanjix.map".
[***].dvi -> [***].pdf
[1][2][3
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 0+577/600 --dpi 577 uprml-h
The command name is C:\texlive\2021\bin\win32\mktexpk
kpathsea: Appending font creation commands to missfont.log.
dvipdfmx: warning: Could not locate a virtual/physical font for TFM "uprml-h".
dvipdfmx: warning: >> There are no valid font mapping entry for this font.
dvipdfmx: warning: >> Font file name "uprml-h" was assumed but failed to locate that font.
dvipdfmx: fatal: Cannot proceed without .vf or "physical" font for PDF output...
No output PDF file written.
Assumption
Seemingly, dvipdfmx fails to load kanjix.map, a file directing fonts to apply.
What I checked
1. The config file of dvipdfmx
> kpsewhich --progname=dvipdfmx --format=othertext dvipdfmx.cfg
c:/texlive/2021/texmf-dist/dvipdfmx/dvipdfmx.cfg
The related part of the .cfg file is like below (lines starting with % mean commented out):
%% Font Map Files
%%
%% teTeX 2.x and TeX Live using updmap (pdfTeX format)
f pdftex.map
%% teTeX 2.x and TeX Live using updmap (DVIPDFM format)
%f dvipdfm.map
%% teTeX 2.x and TeX Live using updmap (DVIPS format)
%% MiKTeX 2.2 and 2.3
%f psfonts.map
%% Put additional fontmap files here (usually for Type0 fonts)
%f cid-x.map
% the following file is generated by updmap(-sys) from the
% KanjiMap entries in the updmap.cfg file.
f kanjix.map
% minimal example for Chinese and Korean users
% improvements please to tex-live@tug.org
f ckx.map
--> The .cfg file seems to be properly written, and it calls kanjix.map properly as well.
2. kanjix.map mapping file
> kpsewhich kanjix.map
c:/texlive/2021/texmf-var/fonts/map/dvipdfmx/updmap/kanjix.map
But THERE IS NO SUCH FILE, INDEED!!!!
And this directry strictly requires the system account of Windows.
Then, from the command prompt with the admin authority, I called notepad.exe and create kanjix.map as
rml H ipaexm.ttf
uprml-h UniJIS-UTF16-H ipaexm.ttf
uprml-hq UniJIS-UCS2-H ipaexm.ttf
hminr-h H ipaexm.ttf
hminrn-h 2004-H ipaexm.ttf
otf-ujmr-h UniJIS-UTF16-H ipaexm.ttf
otf-ujmrn-h UniJIS2004-UTF16-H ipaexm.ttf
otf-cjmr-h Identity-H ipaexm.ttf
gbm H GothicBBB-Medium
(When using uplatex, pointing uprml-h (and uprml-hq) is essential)
Then, I got able to successfully compile such tex files with Japanese characters.
Conclusion
I have no idea why such crucial file was missing... But the problem DID occur and, for this moment, it has solved. Later I will copy kanjix.map (and pdftex.map, which is missing, too) from another Windows machine to the PC on which this problem happened.
References
- https://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=1766
- https://tex.stackexchange.com/questions/569583/dvipdfmx-fails-to-find-pdftex-map-kanjix-map-in-a-fresh-install-tl-distro
- https://texwiki.texjp.org/?%E5%92%8C%E6%96%87%E3%81%AE%E4%BB%95%E7%B5%84%E3%81%BF
- https://lesguillemets.github.io/blog/2014/12/25/uplatex-font.html
- https://zrbabbler.hatenablog.com/entry/2019/10/06/165948
- https://texwiki.texjp.org/?dvipdfmx%2F%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E3%81%AE%E8%A8%AD%E5%AE%9A