Japanese fonts

Set the single character 漢 in Harano Aji Mincho, Hiragino Mincho ProN and IPAex Mincho, measure the width, and all three come out at exactly 10.0pt — one full-width em at 10pt. That is why replacing a Japanese font never reflows a line, quite unlike Latin text, where changing the typeface changes the measure. Which means the real question when choosing a Japanese font in LaTeX is not how it looks but whether the font is actually present on the other person’s machine, and whether it gets embedded in the PDF. This page establishes by measurement which Japanese fonts TeX Live 2024 reliably has, then covers how to name them under LuaLaTeX, XeLaTeX and (u)pLaTeX, and how to confirm the embedding with pdffonts.

Which Japanese fonts are guaranteed to be in TeX Live

Only three lines ship with TeX Live — Harano Aji, IPA and IPAex — and Noto CJK and Source Han are not among them. That is not a guess; it is what kanji-config-updmap-sys status prints. Run it on TeX Live 2024 and it reports the current setting as haranoaji and lists the standby families as haranoaji, ipa and ipaex. Commercial fonts such as Hiragino or Morisawa can be used if they are installed on the system, but TeX Live does not distribute them.

terminal
$ kanji-config-updmap-sys status
CURRENT family for ja: haranoaji (variant: -04)
Standby family : haranoaji
Standby family : ipa
Standby family : ipaex

# asking for a font that is not installed fails loudly
$ lualatex noto.tex
luaotfload | db : Reload initiated; reason: Font "NotoSerifCJKJPRegular" not found.
! Package fontspec Error: The font "NotoSerifCJKJPRegular" cannot be found.

That boundary really does break documents. A minimal file written with \usepackage[noto]{luatexja-preset}, run through LuaLaTeX, stopped at ! Package fontspec Error: The font "NotoSerifCJKJPRegular" cannot be found. — the preset name is defined, but without the real font that is as far as it goes. So for a manuscript you hand to a co-author or a journal, naming haranoaji (or ipaex) is the only safe choice. To use Noto CJK or Source Han you must install the font separately and make sure the other side knows that assumption.

FontOriginBundled with TeX Live 2024?
Harano AjiFree font by Masamichi Hosoda, renumbering Source Han’s CIDs into Adobe-Japan1Yes — the default; 7 weights each of Mincho and Gothic, split across haranoaji and haranoaji-extra
IPAexFree font distributed by Japan’s IPA agencyYes — ipaexm.ttf (Mincho) and ipaexg.ttf (Gothic); the default before TeX Live 2020
Noto CJK / Source HanOpen-source pan-CJK fonts published by Google and AdobeNo — only the font maps ship; the fonts themselves must be installed separately
HiraginoCommercial faces bundled with macOSNo — available only on macOS, called through presets such as hiragino-pron
MorisawaMorisawa’s commercial faces, the standard of commercial printNo — a licence must be bought; presets such as morisawa-pr6n exist for them

Mincho and Gothic — switching with \textmc and \textgt

Japanese typesetting runs on two typefaces. Mincho has thin horizontal strokes, thick verticals and small triangular finials at stroke ends — called uroko, “scales” — making it the counterpart of a Western serif, and it carries the body text. Gothic has strokes of nearly uniform weight and no finials, the counterpart of a sans-serif, and it suits headings, emphasis, captions and labels in figures and tables. Switching follows the same conventions as the Western font commands: the declarative \mcfamily / \gtfamily, and the argument-scoped \textmc{...} / \textgt{...}. Here mc abbreviates mincho and gt abbreviates gothic.

latex
本文は明朝体で組みます。\textgt{ここだけゴシック体}で強調できます。

{\gtfamily この波括弧の中はすべてゴシック体になります。}

見出しなどは \textbf{太字} にすると、和文では自動的にゴシック体になります。

Here is where Japanese departs decisively from Latin: how bold works. Japanese Mincho carries no bold weight by default, so \bfseries and \textbf{} are effectively mapped onto a switch to Gothic (even LuaTeX-ja’s defaults point the bold series of both families at Gothic’s medium). Japanese also has essentially no notion of italic or oblique, so slanted glyphs in the Western sense are simply not provided. \textmc and \textgt move only the family; weight (series) and shape are independent of them. Some classes and packages can be set so that \rmfamily / \sffamily switch Mincho / Gothic in step — in LuaTeX-ja, the match option of luatexja-fontspec.

Beyond these two there are brush styles. Kaisho is the regular “block” brush script, written stroke by stroke with the brush lifted between them; Gyosho is the flowing semi-cursive, with strokes joined and slightly abbreviated. They appear on certificates, formal addresses and invitations, wherever a traditional feel is wanted. There is also Maru Gothic, the rounded Gothic, reached through \mgfamily / \textmg{...}. But few fonts actually contain a rounded Gothic, and Harano Aji does not — even with the deluxe option discussed below, what gets embedded is only Mincho and Gothic. For everyday papers and books, those two remain the ones that matter.

Harano Aji — Source Han renumbered into Adobe-Japan1

Harano Aji is Source Han (Source Han Serif and Source Han Sans) with its CIDs renumbered into Adobe-Japan1. The bundled README says so in one sentence: the fonts were obtained by replacing Adobe-Identity-0 (AI0) CIDs with Adobe-Japan1 (AJ1) CIDs. That is the crux — this is not “a different font that looks similar” but a renumbering. The world of (u)pLaTeX and dvipdfmx calls characters by CID number, so a font not numbered in Adobe-Japan1 cannot ride the traditional workflow. That is precisely why Noto CJK could not simply be made the default.

The author is Masamichi Hosoda. Per the README there are 14 fonts in all — seven weights each of Mincho and Gothic — and TeX Live splits them across two packages. haranoaji holds the seven used by the presets (Mincho Light, Regular, Bold; Gothic Regular, Medium, Bold, Heavy), while haranoaji-extra holds the other seven (Mincho ExtraLight, Medium, SemiBold, Heavy; Gothic ExtraLight, Light, Normal). Run ls on the two directories and you can see the split laid out as files.

terminal
$ ls texmf-dist/fonts/opentype/public/haranoaji/
HaranoAjiGothic-Bold.otf    HaranoAjiGothic-Heavy.otf
HaranoAjiGothic-Medium.otf  HaranoAjiGothic-Regular.otf
HaranoAjiMincho-Bold.otf    HaranoAjiMincho-Light.otf
HaranoAjiMincho-Regular.otf

$ ls texmf-dist/fonts/opentype/public/haranoaji-extra/
HaranoAjiGothic-ExtraLight.otf  HaranoAjiGothic-Light.otf
HaranoAjiGothic-Normal.otf      HaranoAjiMincho-ExtraLight.otf
HaranoAjiMincho-Heavy.otf       HaranoAjiMincho-Medium.otf
HaranoAjiMincho-SemiBold.otf

The body Mincho defaults to HaranoAjiMincho-Regular and Gothic to HaranoAjiGothic-Medium. The practical case for Harano Aji is not only quality: the PDF you get is an order of magnitude smaller than the same text set in IPAex. For a document of just seven characters, the Harano Aji PDF came to 5,617 bytes and the IPAex one to 155,880 bytes. pdffonts reports them as CID Type 0C (Harano Aji, OpenType/CFF) and CID TrueType (IPAex) respectively. The source font files are 6.4 MB and 7.8 MB — near enough the same — so the difference comes not from the typeface but from the format and how efficiently it subsets.

Naming fonts on LuaLaTeX and XeLaTeX — luatexja-preset and zxjafont

On a Unicode engine the shortest path is to hand a preset name to luatexja-preset, part of LuaTeX-ja (luatexja), under LuaLaTeX, or zxjafont under XeLaTeX. Either one sets up the “Mincho is this, Gothic is that” pairing in a single word. The preset names largely agree between them: haranoaji, ipa/ipaex, hiragino-pro/hiragino-pron, noto/noto-otc, sourcehan, ms, yu-win10, morisawa-pr6n, kozuka-pr6n and more are defined. Measured here, a document with \usepackage[haranoaji]{zxjafont} compiled cleanly under XeLaTeX and embedded a subset of HaranoAjiMincho-Regular.

document.tex
% LuaLaTeX
\documentclass{ltjsarticle}
\usepackage[haranoaji]{luatexja-preset}
% add deluxe for multiple weights of Mincho and Gothic:
% \usepackage[haranoaji,deluxe]{luatexja-preset}

% XeLaTeX
% \documentclass[a4paper]{bxjsarticle}
% \usepackage[haranoaji]{zxjafont}

\begin{document}
本文は明朝体。\textgt{見出しはゴシック体}\end{document}

Adding the deluxe option lets you use several weights of Mincho and Gothic within the body. Measured, the PDF from \usepackage[haranoaji,deluxe]{luatexja-preset} embedded four fonts: HaranoAjiMincho-Regular, HaranoAjiMincho-Bold, HaranoAjiGothic-Regular and HaranoAjiGothic-Medium. Note that the ltjs* classes such as ltjsarticle set Japanese slightly smaller than the Latin text — the message Package luatexja-preset Warning: Japanese fonts will be scaled by 0.924715. during compilation is exactly that, and it is by design rather than a problem.

When you want to name a font directly rather than use a preset, load luatexja-fontspec on LuaLaTeX. Its commands mirror fontspec: \setmainjfont (Mincho, the body face), \setsansjfont (Gothic), \setmonojfont (monospaced), \newjfontfamily, and \jfontspec for a one-off. Options are written the same way as in fontspecScale=, Path= and the rest — so what you know from the Latin side carries over. You can give either a typeface name or a filename, and for collaboration the filename (HaranoAjiMincho-Regular.otf) is the more reliable form.

document.tex
\documentclass{ltjsarticle}
\usepackage{luatexja-fontspec}
% naming files, not family names, keeps it reproducible
\setmainjfont{HaranoAjiMincho-Regular.otf}
\setsansjfont{HaranoAjiGothic-Medium.otf}
% \setmainjfont{Hiragino Mincho ProN}   % macOS only
\begin{document}
明朝の本文。\textsf{ゴシックの見出し}\textbf{太字}\end{document}

Naming fonts on (u)pLaTeX + dvipdfmx — kanji-config-updmap and the otf package

In traditional (u)pLaTeX, what gets embedded is decided by a system-side setting, not by the document. The metrics (character widths) of the Japanese fonts used for typesetting are fixed virtually, and no real font name appears in the source. The tool that flips that setting is kanji-config-updmap, shipped with TeX Live: it rewrites the font maps (updmap.cfg) that dvipdfmx consults, swapping the real Mincho and Gothic fonts in one step. Use kanji-config-updmap-sys for all users (administrator rights required) or kanji-config-updmap-user for yourself alone, where the user setting takes priority.

terminal
# show the current setting and the candidates found on this system
kanji-config-updmap-sys status

# switch to Harano Aji (the TeX Live default)
sudo kanji-config-updmap-sys haranoaji

# other examples
sudo kanji-config-updmap-sys ipaex
sudo kanji-config-updmap-sys hiragino-pron

# use the JIS X 0213:2004 glyph shapes
sudo kanji-config-updmap-sys --jis2004 haranoaji

# embed nothing, or auto-detect what is installed
sudo kanji-config-updmap-sys nofont
sudo kanji-config-updmap-sys auto

status lists the current setting and the candidate fonts found on the system. auto searches for a usable commercial or free font, sets it up for embedding, and falls back to no embedding if it finds none. --jis2004 selects the JIS X 0213:2004 glyph shapes (“2004 JIS”); the variant: -04 in the status output above is another name for that same choice. If you need different fonts per document rather than per machine, the pxchfon package lets you make the choice from the preamble instead of touching the system setting.

To use several typefaces and weights in the body, and to reach into the wider Adobe-Japan1 character set, load Shuzaburo Saito’s otf package (japanese-otf) — under upLaTeX, name the engine explicitly, as \usepackage[uplatex]{otf}. Adobe-Japan1 is the standard glyph collection for Japanese fonts, including variants, symbols and old-style characters that do not fit in JIS X 0208. Two commands name characters directly: \UTF{...} takes a Unicode code point (a four- or five-digit hexadecimal), and \CID{...} takes an Adobe-Japan1 CID number in decimal. The benefit is that a glyph you cannot easily type — an old-style character in a personal name, say — can be produced reliably by its code value. The same functionality is available under LuaTeX-ja as luatexja-otf.

latex
\UTF{9DD7}\CID{7652}飾区
葛城市、\CID{1481}城駅

The otf options are worth knowing too. deluxe unlocks seven faces in all — three weights of Mincho, three of Gothic and one Maru Gothic — and adds \mgfamily / \textmg{...} for the rounded Gothic. expert enables extra glyphs such as vertical-writing punctuation and variant forms, and jis2004 selects the 2004 JIS shapes. Actually using several weights requires that matching real fonts be configured on the kanji-config-updmap side. The Japanese font encodings, incidentally, are JY3 for horizontal writing and JT3 for vertical.

Confirming with pdffonts that the font really got embedded

Hand a PDF to pdffonts and it prints one line per embedded font. Three columns matter: emb says yes when the font is embedded, sub says yes when it was subsetted (only the glyphs you used were pulled out), and uni records whether reverse mapping to Unicode is present. On top of that, a six-uppercase-letter prefix like NWYKMN+ in front of the font name is the mark of a subset. Across every route tried on TeX Live 2024, those six letters always appeared.

One more thing worth confirming by measurement: different routes give the same result. Take the same jlreq source, process it once through uplatexdvipdfmx and once directly through lualatex, then look at pdffonts: both embedded a subset of HaranoAjiMincho-Regular. The effect of subsetting is dramatic — the original HaranoAjiMincho-Regular.otf is 6.4 MB, yet the PDF of a seven-character document is only 5,617 bytes. In short, there is little reason to worry that a Japanese PDF for distribution will balloon to several megabytes.

terminal
# same jlreq source, two routes, same embedded font
$ uplatex doc.tex && dvipdfmx doc.dvi && pdffonts doc.pdf
UCCFIG+HaranoAjiMincho-Regular-Identity-H  CID Type 0C  yes yes
KXFDXT+LMRoman9-Regular                    Type 1C      yes yes

$ lualatex doc.tex && pdffonts doc.pdf
NWYKMN+HaranoAjiMincho-Regular             CID Type 0C  yes yes
PNHTXY+LMRoman9-Regular                    CID Type 0C  yes yes

Finally, run this check yourself, every time. Almost every report of “the characters don’t show” or “it comes out garbled” on a Japanese PDF traces back to a PDF where the fonts were never embedded. A leftover kanji-config-updmap-sys nofont setting, or a no-embed option somewhere in the preamble, will show up as no in the emb column of pdffonts. Running pdffonts once before you submit removes this entire class of accident.