Skip to content

mathra 1.10.0

Choose a tag to compare

@matheusmota-dev-br matheusmota-dev-br released this 07 Nov 14:47
· 253 commits to main since this release
f947e46

A pen that writes the equation, and any OpenType math font.

What changed

  • mathra::pen draws an SVG where a pen tip goes over each glyph's outline, rule and line in the order the layout set them, and each one fills in once drawn. It uses SMIL only, plays in a loop and needs no script. Its time follows the length of the ink. wasm gets texToPen, and the playground gets a Pen button and a Pen SVG download (#104).
  • Any OpenType math font (an .otf or .ttf with a MATH table, such as Libertinus Math, Fira Math or Euler Math) can set an equation. Use MathFont::load(bytes) and Options::font in Rust, --font in the terminal, loadFont and { font } in JavaScript, and load_font and font= in Python. The playground loads one from your computer. A font without a MATH table is refused with a reason. STIX Two Math stays embedded and is the default, and without a font the SVG is unchanged (#106).
  • Code that builds an Options listing every field needs the new one (..Default::default()). A missing glyph now reads "the math font has no …" (#106).

Equations, drawn live on the project's evolution: x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

Pull requests

Features

Maintenance

Install

Package Command
Rust mathra cargo add mathra@1.10.0
CLI mathra-cli cargo install mathra-cli@1.10.0
npm @mathlabs/mathra npm install @mathlabs/mathra@1.10.0
Python mathra pip install mathra==1.10.0

Full changelog: v1.9.3...v1.10.0