Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
194 lines (180 loc) · 8.64 KB
/
Copy pathindex.html
File metadata and controls
194 lines (180 loc) · 8.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Math Fonts</title>
<style>
div.main {max-width: 60em; margin: auto;}
dt {margin-top:.5em;font-weight: bold;}
p.breadcrumb {font-size: .9rem; border-bottom: solid thin black;}
p.breadcrumb a {text-decoration:none; color:blue;}
</style>
</head>
<body>
<p class="breadcrumb"><a href="./">MathFonts.github.io</a></p>
<div class="main">
<h1>OpenType Math Fonts</h1>
<p>This repository hosts a collection of OpenType Math fonts in OTF and WOFF2 formats
along with some test pages displaying the pages with MathML.</p>
<h2>Using the Web Fonts Served from this site</h2>
<p>Each font family made available from this site has
a <code>mathfonts.css</code> file which defines a suitable CSS
font-face. It does not define a CSS selector that selects this
family, allowing you to select different font families in
different parts of the document.</p>
<p>So if for example you wish math to be in Noto Sans Math, add:</p>
<pre>
<link rel="stylesheet" href="https://mathfonts.github.io/<b>NotoSans</b>/mathfonts.css"/>
<style>
math {font-family: <b>Noto Sans Math</b>;}
</style>
</pre>
<p>Some of the <code>mathfont.css</code> files also define suitable font face
names for a matching text font, for example you could
add<br/>
<code>body {font-family: Noto Sans;}</code><br/>
If the entire document should be in Noto Sans. Note however that
in general the text fonts are not served from this site and the text font
declarations rely on locally installed fonts.</p>
<p><a href="woff2-list">A list of all the regular weight Math woff2 fonts served from this site.</a></p>
<h2>Using the Web Fonts from your own server</h2>
<p>The current repository files may be obtained from
the <a href="https://github.com/MathFonts/MathFonts.github.io/archive/refs/heads/gh-pages.zip">Zip file generated by GitHub</a>.
The font directories may then be
unpacked into a suitable location on your server and then used as
above.</p>
<h2>Testing WOFF2 fonts with MathML</h2>
<dl>
<dt><a href="math-accents">MathML Accents Font Test</a></dt>
<dd>Test showing a range of MathML accent constructs side by side
in a wide table. A column selector allows fewer fonts to be displayed
or an additional test font to be dropped on to the page.</dd>
<dt><a href="math-samples">MathML Expression Font Test</a></dt>
<dd>Test showing a range of MathML examples side by side
in a wide table. A column selector allows fewer fonts to be displayed
or an additional test font to be dropped on to the page.</dd>
<dt><a href="math-test-expression">Editable MathML Expression Font Test</a></dt>
<dd>A version of the previous test that shows a single MathML expression displayed
in a range of fonts. the expression may be directly entered as MathML or generated
from ASCIIMath or LaTeX syntax using JavaScript convertors hosted on this site.
This page also has the option to drop a local font on to the page
for testing.</dd>
<dt><a href="larger-expressions">MathML Test of Larger Expressions</a></dt>
<dd>Original test file
from <a href="https://fred-wang.github.io/MathFonts/">Frédéric Wang's
upstream repository</a> showing MathML fonts in context with a
drop down menu allowing a different font to be chosen. The file
has been slightly modified to fit the directory layout here and
show the extended set of fonts. This test will also show text fonts in some cases
but the text fonts rely on locally installed files.</dd>
<dt><a href="mozilla_mathml_test">Mozilla MathML Test</a></dt>
<dd>Original Mozilla Test File, as hosted at
<a href="https://fred-wang.github.io/MathFonts/">Frédéric Wang's
upstream repository</a> showing MathML fonts in context with a
drop down menu allowing a different font to be chosen. The file
has been slightly modified to fit the directory layout here and
show the extended set of fonts. </dd>
</dl>
<h2>Testing OTF Fonts with LuaTeX</h2>
<dl>
<dt><a href="pdf-test-expression">LuaLaTeX Sample Generator</a></dt>
<dd>LaTeX Table generator with a similar interface to the MathML tests.
Select the desired fonts and a test LaTeX expression and a (wide or tall) PDF document
will be generated at <a href="https://texlive.net">TeXLive.net</a> in a new tab.</dd>
<dt><a href="https://texlive.net/run?%25 !TeX lualatex
%0A\documentclass{article}
%0A
%0A\usepackage{unicode-math}
%0A\newcommand\setallfont[1]{\setmainfont{%231}\setmathfont{%231}}
%0A
%0A%25 uncomment one font
%0A\setallfont
%0A%25{STIXTwoMath-Regular.otf}
%0A%25{NewCMMath-Book.otf}
%0A%25{latinmodern-math.otf}
%0A%25{mlmodern-math.otf}
%0A%25{Asana-Math.otf}
%0A%25{texgyrebonum-math.otf}
%0A%25{texgyrepagella-math.otf}
%0A%25{texgyreschola-math.otf}
%0A%25{texgyretermes-math.otf}
%0A%25{XITSMath-Regular.otf}
%0A%25{KpMath-Regular.otf}
%0A%25{IBMPlexMath-Regular.otf}
%0A%25{Garamond-Math.otf}
%0A%25{libertinusmath-regular.otf}
%0A%25{Erewhon-Math.otf}
%0A%25{Concrete-Math.otf}
%0A%25{Euler-Math.otf}
%0A%25{DejaVuMathTeXGyre.otf}
%0A%25{OldStandard-Math.otf}
%0A%25{XCharter-Math.otf}
%0A%25{Publiculum.ttf}
%0A%25{FiraMath-Regular.otf}
%0A%25{GFSNeohellenicMath.otf}
%0A%25{NewCMSansMath-Regular.otf}
%0A%25{LeteSansMath.otf}
%0A%25{NotoSansMath-Regular.otf}
%0A%25{ArsenalMath-Sans.otf}
%0A%25{KpMath-Sans.otf}
%0A%25{Luciole-Math.otf}
%0A%25{ComicMathRelief.otf}
%0A%25{PennstanderMath-Regular.otf}
%0A{NagwaTKMath-Regular.otf}%25 Use Nagwa TK
%0A%25{PL46-Math.otf}
%0A
%0A\begin{document}
%0A\begin{gather}
%0A \int_a%5Eb \cos \theta \,d\theta = \sin b - \sin a
%0A \\
%0A \begin{pmatrix}
%0A a&b\\x&y
%0A \end{pmatrix}
%0A +
%0A \begin{pmatrix}
%0A 1&2\\3&4
%0A \end{pmatrix}
%0A =
%0A \begin{pmatrix}
%0A a+1&b+2\\x+3&y+4
%0A \end{pmatrix}
%0A\end{gather}
%0A
%0A\end{document}
%0A">Testing with LuaLaTeX</a></dt>
<dd>All the freely available fonts described here are installed at <a href="https://texlive.net">TeXLive.net</a> The above link leads to an editable test file that shows the outcome of using the fonts with LuaLaTeX.</dd>
</dl>
<h2>Generating WOFF2 Fonts</h2>
<p>This repository includes a python script to convert OTF files to
WOFF format, as described in the Repository README. The majority of
the WOFF2 files are generated by this script, however some of the
newer families, such as Plex, include WOFF2 files in their original
distribution, in which case they are used here, and for others the
conversion was done using the fontforge font editor which can save
fonts in a variety of formats.</p>
<hr/>
<h2>Documentation of OpenType Math Layout</h2>
<ul>
<li><a href="https://github.com/notofonts/math/blob/main/documentation/building-math-fonts/index.md">Building OpenType math fonts</a> Khaled Hosny's detailed explanation of the OpenType MATH Table.</li>
<li><a href="https://www.tug.org/~vieth/papers/bachotex2009/ot-math-paper.pdf">OpenType Math illuminated</a> Urik Vieth's description and comparison with TeX math parameters.</li>
<li><a href="https://learn.microsoft.com/en-us/typography/opentype/spec/math">MATH - The Mathematical Typesetting Table</a> MicroSoft's documentation of the MATH table structure in OpenType.</li>
<li><a href="https://fontforge.org/docs/ui/dialogs/math.html">Fontforge Math table editor</a> Documentation of the MATH table as viewed in the fontforge editor.</i>
<li><a href="https://www.w3.org/TR/mathml-core/">MathML Core</a> The specification of the parts of OpenType Math that should be implemented by browser MathML implementations.</li>
</ul>
<h2>Documentation of Editor Syntax used in test pages</h2>
<ul>
<li><a href="https://temml.org/docs/en/supported">LaTeX syntax supported by Temml</a> for the LaTeX editor on the Expressions Test page.</a>
<li><a href="https://johtela.github.io/asciimath2ml/README.html">Extended AsciiMath syntax supported by AsciiMath2ML</a> for the AsciiMath editor on the Expressions Test page.</a>
</ul>
<hr/>
<h3>Cookies and Privacy</h3>
<p style="font-size:90%">By default this site does not set any cookies. Optionally the state of some pages may be
saved in cookies by use of the <b>Save State (Cookies)</b> button.<br/>
Fonts used with Drag and Drop are not uploaded to a server, they remain on your local machine.<br/>
PDF generation uploads the sample LaTeX text to <a href="https://texlive.net">https://texlive.net</a>
The TeX expression is immediately deleted, and the generated PDF is deleted after an hour.</p>
<hr/>
<p><a href="https://github.com/MathFonts/MathFonts.github.io">Source Repository</a></p>
</div>
</body>
</html>