[Webkit-unassigned] [Bug 133567] New: Use OpenType MATH constant AxisHeight

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 5 22:47:04 PDT 2014


           Summary: Use OpenType MATH constant AxisHeight
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
               URL: http://mpeg.chiariglione.org/standards/mpeg-4/open-fon
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: MathML
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: fred.wang at free.fr
                CC: mrobinson at webkit.org
            Blocks: 122297

Currently, the MathML code seems to use xHeight/2 as an approximation of the math axis (from the MathML spec: the axis of an equation is an alignment line used by typesetters. It is the line on which a minus sign typically lies):

fred at debian:~/webkit/WebKit/Source/WebCore/rendering/mathml$ grep "xHeight()" *
RenderMathMLBlock.cpp:        lengthValue = floatValue * style->fontMetrics().xHeight();
RenderMathMLBlock.cpp:    return (logicalHeight() + style().fontMetrics().xHeight()) / 2;
RenderMathMLFraction.cpp:        return denominatorWrapper->logicalTop() + static_cast<int>(lroundf((m_lineThickness + style().fontMetrics().xHeight()) / 2));
RenderMathMLOperator.cpp:        LayoutUnit axis = style().fontMetrics().xHeight() / 2;
RenderMathMLScripts.cpp:    LayoutUnit axis = style().fontMetrics().xHeight() / 2;

This should probably be handled in a separate "GetMathAxis" function to clarify that we use the math axis. Moreover when a MATH table is available, we should use OpenTypeMathData::AxisHeight to be more accurate.

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