14
9

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 5 years have passed since last update.

LuaLaTeXでUDフォントを使う

Last updated at Posted at 2019-06-10

UD (Universal Design) フォントがWindows 10に付属しているので、それをLuaLaTeXで使う例です。uplatexの場合はPXchfon の新しいやつ(v1.2) を参照。BIZ UD明朝を等幅組(従来の組み方)すればいい場合は\usepackage[bizud]{luatexja-preset}とプリアンブルに書くだけで👌です。

\documentclass[b5paper,12pt]{ltjsarticle}
\usepackage{luatexja-fontspec}

\newjfontface{\nonproportional}{UD Digi Kyokasho N-R}[YokoFeatures={JFM=ujis}]
\setmainjfont[CharacterWidth=Proportional,
  ItalicFont={UD Digi Kyokasho NK-R},
  ItalicFeatures={FakeSlant=0.27},
  SlantedFont={UD Digi Kyokasho NK-R},
  SlantedFeatures={FakeSlant=0.18},
  BoldFont={UD Digi Kyokasho NK-B},
  BoldSlantedFont={UD Digi Kyokasho NK-B},
  BoldSlantedFeatures={FakeSlant=0.18},
  BoldItalicFont={UD Digi Kyokasho NK-B},
  BoldItalicFeatures={FakeSlant=0.27},
  YokoFeatures={JFM=prop}]{UD Digi Kyokasho NK-R}


\newcommand{\testtext}{☃日I本I語IiII}
\begin{document}
\LARGE

\noindent
{\nonproportional\testtext}\\
\testtext\\
\slshape\testtext\\
\itshape\testtext\\
\bfseries\upshape
\testtext\\
\slshape\testtext\\
\itshape\testtext
\end{document}

という文書は以下のような見た目になります。

Screenshot from 2019-06-23 14-18-36.png

STIX Two Textフォントを用いる場合 FakeSlant=0.235 ぐらいでよいです。傾ける度合いは欧文フォントとの兼ね合いで適切な値が決まります。

BIZ UD明朝でプロポーショナル組する場合は以下のようにすると

\documentclass[b5paper,12pt]{ltjsarticle}
\usepackage{luatexja-fontspec}

\newjfontface{\nonproportional}{BIZ UDMincho Medium}[YokoFeatures={JFM=ujis}]
\setmainjfont[Ligatures={Common,TeX},
  ItalicFont={BIZ UDPMincho Medium},
  ItalicFeatures={FakeSlant=0.27},
  SlantedFont={BIZ UDPMincho Medium},
  SlantedFeatures={FakeSlant=0.18},
  BoldFont={BIZ UDPGothic Bold},
  BoldSlantedFont={BIZ UDPGothic Bold},
  BoldSlantedFeatures={FakeSlant=0.18},
  BoldItalicFont={BIZ UDPGothic Bold},
  BoldItalicFeatures={FakeSlant=0.27},
  YokoFeatures={JFM=prop}]{BIZ UDPMincho Medium}


\newcommand{\testtext}{☃日I本ffi語IIiI}
\begin{document}
\LARGE

\noindent
{\nonproportional\testtext}\\
\testtext\\
\slshape\testtext\\
\itshape\testtext\\
\bfseries\upshape
\testtext\\
\slshape\testtext\\
\itshape\testtext
\end{document}

以下のような感じになります

Screenshot from 2019-06-23 15-01-03.png

BIZ UDゴシック を欧文サンセリフ体に合わせてプロポーショナル組するには

\documentclass[b5paper,12pt]{ltjsarticle}
\usepackage{luatexja-fontspec}

\newjfontface{\nonproportional}{BIZ UDGothic}[YokoFeatures={JFM=ujis}]
\setsansjfont[Ligatures={Common,TeX},
  ItalicFont={BIZ UDPGothic},
  ItalicFeatures={FakeSlant=0.23},
  SlantedFont={BIZ UDPGothic},
  SlantedFeatures={FakeSlant=0.23},
  BoldFont={BIZ UDPGothic Bold},
  BoldSlantedFont={BIZ UDPGothic Bold},
  BoldSlantedFeatures={FakeSlant=0.23},
  BoldItalicFont={BIZ UDPGothic Bold},
  BoldItalicFeatures={FakeSlant=0.23},
  YokoFeatures={JFM=prop}]{BIZ UDPGothic}


\newcommand{\testtext}{☃日I本ffi語IIiI}
\begin{document}
\LARGE
\sffamily

\noindent
{\nonproportional\testtext}\\
\gtfamily    
\testtext\\
\slshape\testtext\\
\itshape\testtext\\
\bfseries\upshape
\testtext\\
\slshape\testtext\\
\itshape\testtext
\end{document}

とすると以下のようになる

Screenshot from 2019-06-23 16-12-50.png

参考文献

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?