<TexLive> On the error related to the font-embedding when using uplatex -> dvipdfmx


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 what 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):

dvipdfmx.cfg (extracted)
%% 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 [email protected]
f ckx.map

--> The .cfg file seems 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

kanjix.map
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