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

Provide alternative fonts for formulas #332

Open ForNeVeR opened 1 year ago

ForNeVeR commented 1 year ago

Eventually, we'll need to provide alternatives to Computer Modern we use currently.

Depends on:

msthrax commented 1 year ago

Hi. Any coming updates on new fonts?

ForNeVeR commented 1 year ago

We have made some progress on automated font metric extraction, but that's it.

If you only want to change font of text and not formulas, then just use \text{ … }: this is customizable.

msthrax commented 1 year ago

Actually I need subscript and superscript in my app. I handled that with your library which was great but default font doesn't look good. Can you suggest a way to show subscript and superscript text in WPF App? Thank you. 🙂

ForNeVeR commented 1 year ago

something^{\text{ … }} is also supposed to work, IIRC.

Also, it may depend on the kind of information you want to sub/superscript, but most modern fonts have a separate set of sub/superscript characters (I can't remember if they include all the letters or not).

See this page for an overview.

msthrax commented 1 year ago

As you said, I tested "something^{\text{ … }}" and actually it worked. But my next problem was changing the font and size. I used SystenFontName property to change font family but could do anything with font size. Is there any way for that? Thank U.

ForNeVeR commented 1 year ago

So far, there are no specific controls for the "system font" size. You can only change it together with the math font size, by controlling the scale of the whole formula.