Thursday 9 May 2019

数学のフォント

まぁ、読めなくても困らないのではあるが、気になる。Graph を表す文字らしいんですけど、

  X エックスですよね?!

どうも TeX で

\mathfrak{ABC}

ってやると出るらしい。どっかに、そのフォントがあるはずなんだが。ttf とか otf とかいろいろあって、このMBPにも
いろいろ載っているらしいんですが、

  そのフォントファイルがどこにあるかわからない

lualatex は入れてあるので、動かしては見て、表示はできました。

/usr/local/texlive/2017/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf
/usr/local/texlive/2017/texmf-dist/fonts/opentype/public/lm/lmroman10-italic.otf
/usr/local/texlive/2017/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf
/usr/local/texlive/2017/texmf-dist/fonts/opentype/public/lm/lmroman12-bold.otf

この辺らしいが、見れないぞ。やっぱり、FontForge ?


\documentclass{article}
\usepackage{xfrac,unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}

%% Load 10 math fonts; 1 of them with and without some "stylistic sets"
\setmathfont{Latin Modern Math}[version=lm]
\setmathfont{XITS Math}[version=xits]
\setmathfont{Stix Math}[version=stix]
%\setmathfont{Stix Two Math}[version=stix2] % https://github.com/stipub/stixfonts/
%\setmathfont{Stix Two Math}[StylisticSet={1,2,8}, version=stix2_128]
\setmathfont{TeX Gyre Termes Math}[version=termes]
% \setmathfont{Cambria Math}[version=cambria]
\setmathfont{TeX Gyre Pagella Math}[version=pagella]
\setmathfont{Asana Math}[version=asana]
\setmathfont{Libertinus Math}[version=libertinus]
\setmathfont{TeX Gyre DejaVu Math}[version=dejavu]
%%\setmathfont{Neo Euler}[version=euler] % status: "abandoned"

\setlength\parindent{0pt} % just for this example
\newcommand{\abc}{abcdefghijklmnopqrstuvwxyz}
\newcommand{\ligs}{\ ff fi fl ffi ffl}
\newcommand{\abctextrm}{Text roman: \abc\ligs}
\newcommand{\abctextit}{Text italic: \ \ \textit{\abc\ligs}}
\newcommand{\abcmathit}{Math italic: \ $\abc$}
\newcommand{\formulas}{%
$\displaystyle
\int_{0}^{1}\! x^{2}\,\mathrm{d}x = \sfrac{1}{3}
\qquad
\sum_{k=0}^{\infty} \frac{1}{k^{2}}=\frac{\pi^{2}}{6}
\qquad
\mathcal{ABC}\ \mathfrak{ABC}\ \mathbb{CNQR}$}
\newcommand{\doall}{\abctextrm\par\abctextit\par\abcmathit\par\formulas}

\begin{document}

%% Latin Modern (the default on most systems)
\setmainfont{Latin Modern Roman}
\mathversion{lm}
\section*{Latin Modern Roman, Latin Modern Math}
\doall

\end{document}

No comments: