ShaMan123 / react-native-math-view

Math view for react native! No WebView!
https://github.com/ShaMan123/react-native-math-view
MIT License
78 stars 24 forks source link

Unrecognized font Family 'serif' #42

Closed soufian97 closed 3 years ago

soufian97 commented 3 years ago

Describe the bug Once I want to get the mathematical formula of the text below in "To Reproduce", the application throws an error with this message: "Unrecognized font Family 'serif'"

To Reproduce <MathText value={"$\text{Côté}^2$"} direction="ltr" CellRendererComponent={} /> Expected behavior get correctly the mathematical formula without error

ShaMan123 commented 3 years ago

I haven't used mathjax with special characters yet. So I'm guessing the error points that mathjax needs a font that isn't available to render the letters. Look here: https://docs.mathjax.org/en/latest/output/fonts.html?highlight=font#mathjax-font-support I would try to see if there's a way to load the font or to workaround

ShaMan123 commented 3 years ago

Possible workaround would be:

- value="$\text{Côté}^2$"
+ value="Côté$^2$"
soufian97 commented 3 years ago

thank you, how can I add please this font because it still some texts that need to install the font

ShaMan123 commented 3 years ago

From the docs:

MathJax version 3 currently supports only one font, the MathJax TeX font

Closing: this a mathjax issue, please file the issue there