2 Weeks ago, I asked how to replace the current default Japanese font for LaTex with Noto Sans mono CJK (How can I change the Japanese font to be used). This font is installed on my Fedora PC using the command sudo dnf install google-noto-sans-mono-fonts and I use this font by default for my Japanese texts. (By the way, I do not know which font is now used by Latex nor how it is set in Latex). In response to that question, I was told that the best option was to switch to Luatex because LuaTex would support all Open Type fonts. However, I have not found anywhere how to set this up in Luatex.
I have since found that LuaTex-Ja probably fits my needs even better. Even with the help of this package, however, I do not succeed in using the noto fonts.
With this Preamble, LuaTex-Ja returns the expected result:
\documentclass{article}
\usepackage{amssymb}
\usepackage[haranoaji]{luatexja-preset}
\usepackage{luatexja-fontspec}
\usepackage{mathtools,array,booktabs}
\usepackage{cancel}
\usepackage{nimbussans}
\renewcommand*\familydefault{\sfdefault}
\usepackage{fontenc}
\usepackage[sf]{noto}
\begin{document}
[
\setlength\arraycolsep{0pt}
\renewcommand\arraystretch{1}
\left.
\begin{array}{rr}
\left.\begin{array}{l}
\text{V} \ \text{い-adj}
\end{array}\right} &
\multicolumn{1}{l}{\text{Jisho}} \
\addlinespace
\left.\begin{array}{l}
\text{な-adj} \ \text{N}\textsubscript{1}
\end{array}\right} &
\begin{array}{l}
\text{Jisho} \ \text{$\sim$\cancel{だ}}\to\text{$\sim$な}
\end{array}
\end{array}
\right}
\text{のは N}\textsubscript{2}\text{です}
]
\end{document}
But after changingharanoaji into noto, compilation fails.
The complete log is 1247 lines. Which parts of the log-file are most instructive and should be added?
It would be great if someone could tell me how I can use the Noto Sans mono fonts.
@cfr,
The answer that you produced is exactly what I intended! That means that I don't have to work on the code itself ;-). Alas, on my laptop it still give compile errors. But you gave a lot of clues that I can use to continue my search.
Thanx!
Comment 1
This is the first error in the log:
Package luatexja-preset Warning: Japanese fonts will be scaled by (luatexja-preset) 0.96221923828125.Package luatexja-fontspec Warning: \addjfontfeature(s) ignored; (luatexja-fontspec) it cannot be used with a font that (luatexja-fontspec) wasn't selected by luatexja-fontspec.
luaotfload | cache : Lookup cache loaded from /home/bengbers/.texlive2022/texmf- var/luatex-cache/generic/names/luaotfload-lookup-cache.luc. luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: Font "NotoSer ifCJKJPRegular" not found. luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate.
! Package fontspec Error: The font "NotoSerifCJKJPRegular" cannot be found.
For immediate help type H <return>. ...
l.731 \ltjapplypreset {}
A font might not be found for many reasons. Check the spelling, where the font is installed etc. etc.
When in doubt, ask someone for help!
luaotfload | resolve : sequence of 3 lookups yielded nothing appropriate. luaotfload | aux : no font with id 0
Package fontspec Warning: Font "NotoSerifCJKJPRegular" does not contain (fontspec) requested Script "CJK".
Comment 3
- In an earlier test-file that contained the line
\usepackage{nimbussans},\text{V}produced aVin Nimbus Sans. AVresulted in a V in the default latex font.
Answer 1
Thanks for pointing at the differences between the font-types.
fontencwas included after copying from an example I found somewhere.You mention the use of
NotoSansCJK-Regular.ttc. I searched my filesystem but this file does not exist. I only found/usr/share/fonts/google-noto-sans-mono-cjk-vf-fonts/NotoSansMonoCJK-VF.ttc. Is it possible that this is the cause of my problem?. I found this page Fonts in Luatex on the Internet. I thought most of the suggested tests executed without errors. Obviously, I should have a better look at the test results.I read the Luatex-Ja documentation. As far as I understand it, the documentation mainly gives information on how to display a font. The question of how to select a font is not answered, in my understanding.

fontencif you are usingfontspec. Nor should you loadnimbussanssince that package loadsfontencandtextcomp. I thinkharanoajiwill not use Noto. It seems to load a specific set of fonts of its own, but I don't know enough (anything) about Japanese typesetting to be sure. I would loadluatexja-fontspecbefore thepresetand check whether this is the correct way to do it. To start, though, load onlyluatexja-fontspecand see docs. – cfr Oct 21 '23 at 03:14luatexja-fontspecpackage (see Table 1 in the documentation) provides\setsansjfont,\setjfontfamilyand\addjfontfeaturescommands. – Cicada Oct 22 '23 at 00:46fontconfigto check. E.g.fc-match "Noto Serif CJK JP"returnsNotoSerifCJK-Regular.ttc: "Noto Serif CJK JP" "Regular";fc-match "Noto Sans CJK JP"returnsNotoSansCJK-Regular.ttc: "Noto Sans CJK JP" "Regular". – cfr Oct 23 '23 at 04:25