Re: Interpretation of OpenType MATH fraction shifts

I actually see in code that shift is relative to baseline. Look at PTLS7::CalcFractionOffsets function in LsMathFractionApi.cpp:

    LONG dvGapNumerator = dvNumeratorShiftUp - dvNumeratorDescent - (dvAxisHeight + dvRuleThicknessOver2);
    ...
    duvNumerator.v = dvAxisHeight + dvRuleThicknessOver2 + dvGapNumerator + dvNumeratorDescent;

Which is equivalent to
    duvNumerator.v = dvNumeratorShiftUp

This is consistent with shifts for other math structures, e.g. superscript, where making it relative to math axis doesn't make sense.

Thanks,
Sergey
________________________________
From: Murray Sargent <murrays@exchange.microsoft.com>
Sent: Tuesday, August 6, 2019 10:47 AM
To: Frédéric Wang <fwang@igalia.com>
Cc: public-mathml4@w3.org <public-mathml4@w3.org>; Victor Kozyrev <victork@microsoft.com>; Sergey Malkin <sergeym@microsoft.com>; Peter Constable <petercon@microsoft.com>
Subject: RE: Interpretation of OpenType MATH fraction shifts

Looking at the LineServices math fraction handler code, I think the OpenType math table numerator shift-up and denominator shift-down parameters are relative to the math axis.

For confirmation, adding Victor, who wrote the math fraction handler code, Sergey, our OpenType math table expert, and Peter who has edited the OpenType math table spec.

Thanks,
Murray

-----Original Message-----
From: Frédéric Wang <fwang@igalia.com>
Sent: Tuesday, August 6, 2019 7:53 AM
To: public-mathml4@w3.org; Murray Sargent <murrays@exchange.microsoft.com>
Subject: Interpretation of OpenType MATH fraction shifts

Hi Murray,

Can you please indicate whether numerator/denominator shifts should be relative to the fraction baseline:

https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmathml-refresh%2Fmathml%2Fissues%2F123&amp;data=04%7C01%7Csergeym%40microsoft.com%7C23418ee72935478ed7d308d71a962c85%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637007104604276097%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C-1&amp;sdata=nWBieXR82IXEct4YidbFW2XTyYiSW8pRRZl0U6otirs%3D&amp;reserved=0

Thanks,

--
Frédéric Wang

Received on Tuesday, 6 August 2019 18:33:09 UTC