noties / jlatexmath-android

A Java API to render LaTeX
Other
58 stars 10 forks source link

Omega rendering #1

Open noties opened 4 years ago

noties commented 4 years ago

https://github.com/noties/Markwon/issues/176

noties commented 4 years ago

It appears that Ω (defined as \Omega in LaTeX) symbol is not rendered by Android. It is defined in the /jlatexmath/jlatexmath/src/main/assets/org/scilab/forge/jlatexmath/fonts/latin/jlm_cmr10.ttf font and mapped to the 00AD symbol. Other glyphs from the same font are rendered OK. The nature of this behavior is unclear.

noties commented 4 years ago

Possible workaround is to use text mode to render Omega symbol:

\mbox{Ω}

Please note that this requires jlatexmath-android-font-greek dependency.

zyy1214 commented 1 year ago

Hi, I'm also using jlatexmath in android and had encountered the same problem. I didn't find the exact cause but have a solution. In jlatexmath, \Omega is placed in U+00AD in its fonts. If you change it to U+00AC or other places, it will be rendered properly. I think maybe it's because U+00AD is a somewhat special character in unicode and android is doing something special while rendering it.