LuaLaTeX + luatexja + beamer: Serif vs. Sans-Serif

beamerfontsjapaneseluatexluatexja

  • I wanted to create a beamer presentation in which Japanese and English are mixed.
  • According to my Google-Fu, the luatexja package is good for that.
  • In principle, it was surprisingly easy to use. I even don't know which Japanese font is used – it just worked.
  • My problem is that the non-bold text is serif and the bold text is sans-serif (for Japanese).
  • The goal is to have it all sans-serif.
  • In case it is relevant, I use TeXLive 2021 on Windows 10.

\documentclass[t]{beamer}
\usepackage{fontawesome}
\usepackage{luatexja}

\begin{document}

\begin{frame}{Test}
Test (sans-serif \faThumbsUp)\\
\textbf{Test} (sans-serif \faThumbsUp)\\
ォテ (serif \faThumbsDown)\\
\textbf{ォテ} (sans-serif \faThumbsUp)
\end{frame}

\end{document}

enter image description here

Remark: I tried the match option from the luatexja package but this does not seem to change the output.
enter image description here


Remark: Just for completeness, in the article document class it is like this:

\documentclass[t]{article}
\usepackage{fontawesome}
\usepackage{luatexja}

\begin{document}

%\begin{frame}{Test}
\noindent
Test (serif)\\
\textbf{Test} (serif)\\
ォテ (serif)\\
\textbf{ォテ} (sans-serif)
%\end{frame}

\end{document}

enter image description here

Best Answer

As documented in section 2.4 of the manual:

If you use the beamer class with the default font theme (which uses sans serif fonts) and with LuaTEX- ja, you might want to change default Japanese fonts to the gothic family. The following line changes the default Japanese font family to it:

\renewcommand{\kanjifamilydefault}{\gtdefault}

By default this will give you bold text, but you can load a fontfamily supporting multiple weights of gothic using the luatexja-preset package. You have to pass the deluxe option if you want multiple weights:

  • deluxe

    Use the mincho family with three weights (light, medium, and bold), the gothic family with three weights (medium, bold, and extra bold), and rounded gothic. [...]

You can read the documentation for all the supported presets, here I will use Noto (on Windows you might want to replace noto-otf with e.g. yu-win10 to avoid performance issues):

\documentclass[t]{beamer}
\usepackage{fontawesome5}
\usepackage{luatexja}
\usepackage[deluxe,noto-otf]{luatexja-preset}
\renewcommand{\kanjifamilydefault}{\gtdefault}

\begin{document}

\begin{frame}{Test}
Test (sans-serif \faThumbsUp)\\
\textbf{Test} (sans-serif \faThumbsUp)\\
ォテ (gothic \faThumbsUp)\\
\textbf{ォテ} (gothic \faThumbsUp)
\end{frame}

\end{document}

enter image description here