ForNeVeR / xaml-math

A collection of .NET libraries for rendering mathematical formulae using the LaTeX typesetting style, for the WPF and Avalonia XAML-based frameworks
MIT License
641 stars 102 forks source link

Allow overriding font for letters in math mode #411

Open ForNeVeR opened 1 year ago

ForNeVeR commented 1 year ago

Traditionally, most TeX systems make a distinction between math mode and text mode, and different fonts may be used for each.

In XAML-Math, we use Computer Modern for math mode, and any user-provided font for text mode (i.e. the \text{} command).

The reason we use Computer Modern is that it includes the special characters to properly draw the radical character, several symbols for brackets of different sizes and so on.

Notably, we do not rely that much on actual letters (or, for that matter, digits) from the font.

Also, we now have a way of generating certain font size metrics on the fly.

I suggest us to consider providing an option to override the font used for text in the math mode.