1

OTF fonts a have a number of features such as:

  • Variants
  • Ligatures
  • Swashes
  • Alternates
  • etc.

Is it possible to use a combination of these features to render complex math formulae without depending on a particular environment or tool (e.g. MS Word, SVG, HTML canvas) but just an environment that supports all OTF features?

For example, the Fira Code font uses ligatures to render these semi-complex symbols in any environment that supports ligatures -- editors and IDEs, terminals, word processors, etc:

Fira Code

To be more specific, Fira Code renders != as or <-> as .

My question is, does OTF have everything that is needed to render more complex formulae (e.g. everything that can be rendered using MathJax or similar tools) just by relying on OTF features, and nothing else?

To be more precise, with almost every ordinary font (Arial, Courier, Times New Roman, etc.):

\f{x} = \int_{-\infty}^\infty
\hat \f\xi\,e^{2 \pi i \xi x}
\,d\xi

is rendered just as is. But can someone design a font F that when given

\f{x} = \int_{-\infty}^\infty
\hat \f\xi\,e^{2 \pi i \xi x}
\,d\xi

it renders it as:

Font X

?

closed as off-topic by Henri Menke, Stefan Pinnow, Joseph Wright May 12 at 6:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Henri Menke, Stefan Pinnow, Joseph Wright
If this question can be reworded to fit the rules in the help center, please edit the question.

  • How is this related to TeX? – Johannes_B May 12 at 4:06
  • What you show is a default math output which can be done with every oft math font,e.g. Stix2 – user187802 May 12 at 4:12
  • 2
    How are you going to “give” \f{x} ... to the font? That is not how fonts work. – Henri Menke May 12 at 5:32
  • 1
    Rendering math is quite different from, and far more complex than, rendering text. There is much much more to typesetting math than adding a few frills here and there to a text font. While there are thousands (and probably tens or even hundreds of thousands) otf text fonts out there, I'd be surprised if more than a dozen or so high-quality otf math fonts exist. To start getting an appreciation for how rendering math is far more complex than rendering text is, please read the entire user guide of the unicode-math package. – Mico May 12 at 5:47
  • 4
    I'm afraid this is off-topic for us. I think you need to work out what you really mean by the 'font doing it'. The font itself doesn't really do anything: it's data structures are used by the shaper which loads it. You seem to be suggesting that a font should be a self-contained typesetting system, which would require them to be very large, repetitive (and probably buggy), etc. – Joseph Wright May 12 at 7:02

Browse other questions tagged or ask your own question.