0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

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

Last updated at Posted at 2022-03-22

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

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 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

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

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?