[Webkit-unassigned] [Bug 41535] "vertical-align: middle; " not working on a MathML element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 6 11:16:28 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=41535





--- Comment #6 from Fran├žois Sausset <sausset at gmail.com>  2010-09-06 11:16:28 PST ---
I'll correct the style.
The cast is here, because xHeight is a float and Core Graphics seems to return a value just above zero but not zero for Apple Symbols fonts that have no "x" glyph. Thus the test if (!m_xHeight) is always false.

I thought that m_ascent was a float. It is indeed an int.
I don't know which possibility is the best:
- 0.66 * fAscent;
- static_cast<float>(2 * m_ascent / 3);

The first one is probably better from a precision point of view, but does it matter in practice?
The second one should be faster.

After testing with the test case, the precision changes nothing. So the second possibility is probably better.

The change is only needed for the mac port, as it is here to fix the Apple Symbols font problem.

I don't know if it happens with other fonts on other platforms, but the code without my patch is supposed to deal correctly with fonts without an "x" glyph. It seems that it is Core Graphics that doesn't properly deals with Apple Symbols font. An equivalent fix should ideally be inside CGFontGetXHeight().

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list