# ODF converted fonts from WOFF don't seem to work properly

It’s all explained here: I tried to install LaTeX MathJax fonts on LibreOffice, so I can use them, just like I do with Kate. In order to do so, I searched the fonts on / and found some WOFF files. I converted them online into ODF and moved them to /usr/local/share/fonts/. So far, I’ve found two problems, though:

1. There are some characters that I can’t use on LO, but I can on Kate like ñ.
2. The vertical alignment is wrong, and it appears way upper than it should when nothing is written before (the alignment also fails on Calc):

Note the header mark: ┘

EDIT:

• OS: Manjaro Linux (KDE version with Plasma), stable branch
• LibreOffice 7.3.4.2 30(Build:2)
• Save format: ODT

Screenshot with formatting marks:

Example file:
example file.odt (9.8 KB)

A screenshot has very little value (save perhaps for UI issues), all the more since you didn’t enable View>Formatting Marks. Are you sure you have no direct formatting or other manual request to offset characters (such as superscript, though this shouldn’t overflow in the header)? Is your MathJax line inside a frame? (Once again you haven’t enabled the visual cues) A frame can be positioned anywhere in the page, irrespective of the various boundaries.

Edit your question (don’t add a comment, so the question contains all the relevant details without the need to search for them through myriads of comments) to provide:

• OS name
• LO version
• save format

Describe how you created your MathJax line and, if possible, where it resides.

For best analysis, attach a sample file (the same as used for creating the screenshot will be nice).

Thank you for replying, I’ve just edited the post!

Are you sure you have no direct formatting or other manual request to offset characters (such as superscript, though this shouldn’t overflow in the header)?

No, only font change.

Is your MathJax line inside a frame?

No, it’s just raw text

Describe how you created your MathJax line and, if possible, where it resides.

Would you mind elaborating a bit more what you mean by that? I can’t quite understand what you’re asking. I installed some LaTeX basic packages, where this font is quite used, this is why I like it: it reminds me of LaTeX. I searched the fonts on my computer and found the WOFF files so I thought on converting them into ODF or TTF. Then, I ended up doing it with ODF and moved them to  /usr/local/share/fonts/.

I wondered if the MathJax line was the result of some extension or formula editor like Math where the created “object” ends up in a frame.

I assume that you mean OTF (OpenType font) and not ODF (Open Document Format) for the font.

Without the MathJax font here, everything is fine (LO 7.3.4.2, Fedora 36, KDE Plasma desktop). Please attach the font file. To do that, add .odt extension at end of filename otherwise the site engine won’t let you.

I assume that you mean OTF (OpenType font) and not ODF (Open Document Format) for the font.

Yes! I do

Without the MathJax font here, everything is fine (LO 7.3.4.2, Fedora 36, KDE Plasma desktop). Please attach the font file. To do that, add .odt extension at end of filename otherwise the site engine won’t let you.

Sure!
MathJax_Main-Regular.otf (46.5 KB)

IMHO your MathJax_Main font is buggy.

I had a look to it with FontForge but didn’t find anything suspect (I’m no font designer expert, so take my judgement with caution) save this is a very sparse font. Surprisingly for a “math” font, very few math symbols are defined. This means sumbols will be borrowed from other substitution fonts. Practically only ASCII characters are stored in the font; only 11 uppercase Greek characters are there.

This scarcity explains why you can’t display ñ because it is absent from Latin-1 (and font family name in the font tables is so peculiar that no substitution can be found). Perhaps you get an elongated rectangle because the “.notdef” glyph is defined so. And this probably takes precedence over substitution.

I made other trials by assigning this font to Text Body and seeing what happens. Any paragraph containing only MathJax and absolutely no character in other font becomes scrippled with all lines overlaid over one another. This lead me to suspect that line spacing was faulty.

Consequently, I forced Line Spacing in Text Body. A value like 0.5cm fixed the issue for a size of 13pt (this increase to 13pt was necessary to make the glyph-eye compatible with Liberation Sans 12pt.

This is not acceptable if you intend to use this font at various sizes. I then tried a Proportional value. 1800% (yes, one thousand eight hundred!) is necessary. But every line is offset upwards. Even subscripting can’t eliminate first line overlay with previous paragraph.

IMHO again, this font is too buggy (and its coverage is too small) to be useable. It was created 2009-10-12 and last modified 2011-05-14 (but which modification?), i.e. before the current standards for font formats were published.

You should search the net for an up-to-date (standard-wise) version of the font. I personally use to advantage the public domain TeX Gyre fonts. Their primary quality is they share a common metrics so that serif, sans and monospace fonts are compatible without tricky artefacts. They can be mixed in the same line without impact on line spacing.

2 Likes

It is indeed very old! I had no idea how old it was wow! I found this GitHub repo, though, so I’ll install them from there. I too believe it was the conversion process what messed it up, but I wasn’t sure.

BTW, I also checked the TeX Gyre fonts you mentioned and I think they’ll do the work haha seems like som of these MathJax fonts lack the numbers, including MathJax Math lol.

Anyway, thank you so much for your responses! You have been a great help!