font rendering issues

37 views
Skip to first unread message

nageh

unread,
Nov 17, 2011, 9:52:30 AM11/17/11
to MathJax Users
A user just reported that brackets would be rendered so faintly that
they'd be mistaken for floor signs. As an example, there is no
difference in the visual appearance of the HTML/CSS rendering between
\mathbb{E} \bigl[ X \bigr]
and
\mathbb{E} \lfloor X \rfloor.

I am aware that this is primarily a font rendering issue that depends
on operating system and browser, but is there anything you can do to
avoid this suboptimal result?

Thanks,
-nageh

leathrum

unread,
Nov 17, 2011, 11:17:06 AM11/17/11
to MathJax Users
I couldn't confirm your issue -- I tried your tests on my browser
setup, and the difference between the bracket and the floor was
clear. I am using Firefox (so MathJax goes to MathML output) with the
STIX fonts installed (so I don't use the web fonts or the image file
fallbacks). What browser and configuration are you using?

nageh

unread,
Nov 17, 2011, 12:55:47 PM11/17/11
to MathJax Users
As I pointed out, I am referring to HTML/CSS rendering (TeX fonts).
It's all fine in MathML output mode with STIX fonts.

-nageh

leathrum

unread,
Nov 17, 2011, 3:27:06 PM11/17/11
to MathJax Users
For me, switching via the context menu to HTML/CSS rendering in
Firefox makes the difference between bracket and floor even more
apparent. In fact, the bracket looks a bit oversized and heavy by
comparison (probably in part because of your use of \bigl and \bigr).
The \mathbb{E} looks different (no serifs) in HTML/CSS, too, which
suggests to me that the HTML/CSS mode is using the web fonts in my
setup. I'm still thinking this is a browser-specific issue, so I'll
ask again, which browser and configuration are you using?

Davide P. Cervone

unread,
Nov 17, 2011, 8:10:02 PM11/17/11
to mathja...@googlegroups.com
I am also not able to reproduce the problem, and I tried in several
browsers, including IE, and all its emulation modes.

Can you tell us what browser was being used?

Also, can you point to a page where this is occurring? It may be
affected by font size or other CSS in play, which means that we can't
reproduce it outside those special conditions.

Davide

Mike Pearson

unread,
Nov 18, 2011, 4:39:21 AM11/18/11
to mathja...@googlegroups.com
Just a note to say that we have also seen occasional issues with disappearing horizontal lines - missing minus signs, and missing horizontal bars in fractions.

It is dependent on browser zoom level, so to reproduce I think you have to be zoomed out on fonts somewhat. I think the horizontal glyphs reappear when zoom levels are reset.

Mike

Davide P. Cervone

unread,
Nov 18, 2011, 2:54:58 PM11/18/11
to mathja...@googlegroups.com
I know that this can happen with the fraction lines when you zoom
out. Most of the browsers now zoom their pixel size as well as
everything else, so it is almost impossible to tell what the actual
pixel size is in order to make sure that MathJax is producing lines
that are large enough (and even if you did, you could still zoom after
the math is typeset and have it disappear). Usually the font
rendering is better about losing horizontal lines, and my experience
is that it takes quite a zoom to lose minus signs (or have plus signs
turn into minus signs). It does seem to be pretty sensitive to the
font size.

I'm not certain if this issue is that one or if it is an issue with
the clipping rectangle. It is possible that the rounding of em's to
screen pixels has caused the clipping box to be off by one pixel,
causing the bottoms or tops of the brackets to be cut off. I will
need to see it in action to find out which it is.

Davide

nageh

unread,
Nov 18, 2011, 5:03:43 PM11/18/11
to MathJax Users
Just reproduced this by adding the maths lines into the test/
index.html file of the MathJax package. Tested on Firefox 8 on Windows
Vista. Zooming any level out(!) makes the brackets fully shown.
Zooming in (i.e., enlarging the font size) results in the upper
horizontal line reappear or disappear, depending on the zoom level.

-nageh

Davide P. Cervone

unread,
Nov 22, 2011, 1:01:48 PM11/22/11
to mathja...@googlegroups.com
OK, I'm able to reproduce it in Windows 7 (I don't have Vista),
although for me you have to zoom out 1 level to get the problem.

I'm not sure there is anything I will be able to do about it, as it
appears to be a font rendering problem. Perhaps there is something
that can be done to the font to make it work better in Firefox, but
I'm not a font expert and don't know what that would be. I have been
able to verify that it is NOT a MathJax clipping problem as I thought
it might have been originally. The character itself is simply not
being rendered properly by Firefox. It looks to me that the only
place this could be fixed would be in the font itself.

If any font experts have any ideas, I'd be happy to hear them.

Davide

nageh

unread,
Nov 22, 2011, 4:41:22 PM11/22/11
to MathJax Users
Oddly, it seems that the problem is specific to Firefox font
rendering. I recall that some special characters of common fonts
looked really horrible in Firefox 4.0 -- in that respect, Firefox
7.0/8.0 has much improved rendering. Oddly, too, font rendering is not
only different in IE but other characters get distorted really badly,
especially for smaller point sizes.

I second that any font expert's input is appreciated.

-nageh

Reply all
Reply to author
Forward
0 new messages