summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/firamath-otf
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-09-17 21:07:24 +0000
committerKarl Berry <karl@freefriends.org>2018-09-17 21:07:24 +0000
commit3b85244437b017368c0c619981139f3ad30322e4 (patch)
tree4497c8a60725dc1c279bd8358abb86148d393c86 /Master/texmf-dist/tex/latex/firamath-otf
parentab5a71f0a9e93dbd2834b56de9cca430bbe082f5 (diff)
firamath-otf (17sep18)
git-svn-id: svn://tug.org/texlive/trunk@48687 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/firamath-otf')
-rw-r--r--Master/texmf-dist/tex/latex/firamath-otf/firamath-otf.sty79
1 files changed, 79 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/firamath-otf/firamath-otf.sty b/Master/texmf-dist/tex/latex/firamath-otf/firamath-otf.sty
new file mode 100644
index 00000000000..e066ad4a89d
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/firamath-otf/firamath-otf.sty
@@ -0,0 +1,79 @@
+%% $Id: firamath-otf.sty 808 2018-09-17 06:52:53Z herbert $
+%%
+%% This file is distributed under the terms of the LaTeX Project Public
+%% License from CTAN archives in directory macros/latex/base/lppl.txt.
+%% Either version 1.3 or, at your option, any later version.
+%%
+%
+% Copyright 2018 Herbert Voss hvoss@tug.org
+%
+\ProvidesPackage{firamath-otf}[%
+ 2018/09/17 v. 0.01 (Herbert Voss) Supports fira math fonts for all luatex/xetex .]
+
+\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp}
+\RequirePackage{unicode-math}
+
+\newif\iffiramath@fakebold \firamath@fakeboldfalse
+\newif\iffiramath@lining \firamath@liningtrue
+\newif\iffiramath@tabular \firamath@tabulartrue
+\newif\iffiramath@usefilenames \firamath@usefilenamesfalse
+
+\DeclareOptionX{fakebold}[true]{\@nameuse{firamath@fakebold#1}}
+\DeclareOptionX{weight}[Regular]{\def\fira@weight{#1}}
+\DeclareOptionX{lining}[true]{\@nameuse{firamath@lining#1}}
+\DeclareOptionX{nf}[true]{\@nameuse{firamath@lining#1}}
+\DeclareOptionX{lf}[true]{\@nameuse{firamath@lining#1}}
+\DeclareOptionX{oldstyle}[true]{\@nameuse{if#1}\firamath@liningfalse\else\firamath@liningtrue\fi}
+\DeclareOptionX{osf}[true]{\@nameuse{if#1}\firamath@liningfalse\else\firamath@liningtrue\fi}
+
+\DeclareOptionX{usefilenames}[true]{\@nameuse{firamath@usefilenames#1}}
+\DeclareOptionX{nomath}[true]{\@nameuse{firamath@nomath#1}}
+
+\DeclareOptionX{tabular}[true]{\@nameuse{firamath@tabular#1}}
+\DeclareOptionX{t}[true]{\@nameuse{firamath@tabular#1}}
+\DeclareOptionX{proportional}[true]{\@nameuse{if#1}\firamath@tabularfalse\else\firamath@tabulartrue\fi}
+\DeclareOptionX{p}[true]{\@nameuse{if#1}\firamath@tabularfalse\else\firamath@tabulartrue\fi}
+
+\newcommand*\firamath@scale{1}
+\DeclareOptionX{Scale}{\renewcommand*{\firamath@scale}{#1}}
+
+\def\firamath@defaultfeatures{}
+\DeclareOptionX{defaultfeatures}{\def\firamath@defaultfeatures{#1}}
+
+\ProcessOptionsX\relax
+
+\iffiramath@fakebold\RequirePackage{xfakebold}\fi
+\iffiramath@lining
+ \def\firamath@figurestyle{Lining}
+\else
+ \def\firamath@figurestyle{OldStyle}
+\fi
+
+\iffiramath@tabular
+ \def\firamath@figurealign{Monospaced}
+\else
+ \def\firamath@figurealign{Proportional}
+\fi
+
+\ifxetex\XeTeXtracingfonts=1\fi
+\defaultfontfeatures{\firamath@defaultfeatures}
+
+\iffiramath@usefilenames
+ \setmathfont{FiraMath-\fira@weight.otf}[
+ Scale=\firamath@scale,
+ Numbers={\firamath@figurestyle,\firamath@figurealign},
+% BoldFont=FiraMath-Medium.otf
+ ]
+ \setmathfont[version=pnum,Numbers=Proportional,Scale=\firamath@scale]{FiraMath-Regular.otf}
+
+\else
+ \setmathfont{Fira Math Regular}[
+ Scale=\firamath@scale,
+ Numbers={\firamath@figurestyle,\firamath@figurealign},
+% BoldFont=Fira Math Medium
+ ]
+ \setmathfont[version=pnum,Numbers=Proportional,Scale=\firamath@scale]{Fira Math Regular}
+\fi
+
+
+\endinput \ No newline at end of file