JKQtPlotter/lib/jkqtmathtext/resources/firaMath/README.md
jkriege2 6ebd8743ca JKQTMathText:
- NEW: Added the Fira Math fonts as sans-serif symbol font to the library (as a ressource) and added JKQTMathText::useFiraMath()
  - NEW: Added JKQTMathText::useGuiFonts()</li>
JKQTPlotter:
  - NEW: Using JKQTMathText::useGuiFonts() for FONT rendering by default
2022-09-01 14:36:34 +02:00

4.6 KiB
Raw Permalink Blame History

Fira Math

Build Status CTAN GitHub release

Fira Math is a sans-serif font with Unicode math support. This font is a fork of

Showcase

firamath-demo-2 firamath-demo-3 firamath-demo-4 firamath-demo-5

Installation

On your system

Download FiraMath-Regular.otf from the GitHub release page, then:

  • Windows
    1. Quit related programs, e.g. Microsoft Word.
    2. Double-click the font file to open it in the Font Previewer.
    3. Click Install bottom to install.
    4. You can also directly copy all the .otf font files into %WINDOWS%\Fonts\ to install them.
  • macOS
    1. Double-click on the font files in Finder.
    2. It will open in the font previewer. Click Install Font. It will open in the Font Book.
    3. Close the Font Book. The fonts should now be available.
    4. Details can be found in this article.
  • Linux
    1. Copy the .otf font files to your fonts directory.
    2. Run sudo fc-cache.

On the TeX distribution

  • If there are no special reasons, you should always install Fira Math via the package manager:

    • TeX Live: run tlmgr install firamath
    • MiKTeX: run mpm --admin --install=firamath

    Both distributions have GUI interfaces, you may enjoy them as well.

  • [NOT RECOMMENDED] Download firamath.tds.zip from CTAN or GitHub release page, extract it in the root of one of your TDS trees, then run mktexlsr and fc-cache to update the filename database and font cache.

Usage

Fira Math can be used in LaTeX, ConTeXt and Microsoft Word after installed on your OS (or the TeX distribution).

LaTeX

% Compiled with XeLaTeX or LuaLaTeX
\documentclass{article}
\usepackage{amsmath}
\usepackage[mathrm=sym]{unicode-math}
\setmathfont{Fira Math}

\begin{document}
\[
  \int_0^{\mathrm{\pi}} \sin x \, \mathrm{d}x = 2
\]
\end{document}

You may try the firamath-otf package as well. - Thanks Herbert Voß!

ConTeXt

% Compiled with ConTeXt MkIV
\definefontfamily [mainface] [rm] [FiraGO]  % Require FiraGO fonts
\definefontfamily [mainface] [mm] [Fira Math]
\setupbodyfont    [mainface]

\starttext
\startformula
  \int_0^{\mathrm{\pi}} \sin x \, \mathrm{d}x = 2
\stopformula
\stoptext

See https://tex.stackexchange.com/q/429621.

Microsoft Word

  1. Create a new equation. Then select the little additional settings corner.
  2. In the menu, change the Default font to Fira Math.
  3. In order for the changes to take effect, you will have to create a new equation environment (the current one will not be changed).
  4. To change the font in existing equations, select the equation text and select an OpenType math-enabled font (such as Fira Math).

See https://superuser.com/q/1114697.

Building from source

To build Fira Math, you may

python -m pip install -U pip
pip install -r requirements.txt
patch $(python -c "import os, glyphsLib; print(os.path.join(glyphsLib.__path__[0], 'builder', 'axes.py'))") scripts/axes.py.diff
python scripts/build.py

Note that Python 3.9+ is required. Since we are using the dev version of glyphsLib, it's better to use a Python virtual environment.

To edit the source files, Glyphs 3 is required.

Development builds

If you just want to download the latest development version, please try the artifacts in GitHub Actions.

Contributing

Issues and pull requests are always welcome.

License

This Font Software is licensed under the SIL Open Font License, Version 1.1.


Copyright (C) 20182021 by Xiangdong Zeng.