<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><br><br><div dir="ltr">Sent from my iPhone</div><div dir="ltr"><br><blockquote type="cite">On 23 Oct 2022, at 5:20 am, Caolán McNamara <caolanm@redhat.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span>On Sat, 2022-10-22 at 01:42 +1100, Chris Sherlock wrote:</span><br><blockquote type="cite"><blockquote type="cite"><span>Test name: VclLogicalFontInstanceTest::testglyphboundrect</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>equality assertion failed</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>- Expected: 51x82@(7,-80)</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>- Actual  : 51x83@(7,-80)</span><br></blockquote></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>I’ve had another look at the code, with some help from Khaled. The</span><br></blockquote><blockquote type="cite"><span>issue is the way in which we do our final rounding. </span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>On Freetype, it uses 26.6 fixed point, and thus needs it’s own</span><br></blockquote><blockquote type="cite"><span>special FreeType ceil and floor functions. CoreText appears to using</span><br></blockquote><blockquote type="cite"><span>floating point, but the std::ceil and std::floor functions give</span><br></blockquote><blockquote type="cite"><span>slight different results. </span><br></blockquote><span></span><br><span>I presume that for mac its CoreTextStyle::ImplGetGlyphoundRect and the</span><br><span>CTFontGetBoundingRectsForGlyphs so could print the numbers we get there</span><br><span>vs the ones we get in FreeTypeFont::GetGlyphBoundRect to verify that. </span><br></div></blockquote><br><div><span style="caret-color: rgb(32, 33, 36); color: rgb(32, 33, 36); font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 14px; white-space: pre-wrap;">I’ve added some debugging statements. the Freetype library does its own floor and ceil calculations. it’s looking like it isn’t a risky a rounding error, it is just that Freetype calculates one value and MacOS framework for glyphs calculates it differently.</span></div><div><span style="caret-color: rgb(32, 33, 36); color: rgb(32, 33, 36); font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 14px; white-space: pre-wrap;"><br></span></div><div><span style="caret-color: rgb(32, 33, 36); color: rgb(32, 33, 36); font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 14px; white-space: pre-wrap;">Patch is </span><a href="https://gerrit.libreoffice.org/c/core/+/142006">https://gerrit.libreoffice.org/c/core/+/142006</a> if anyone would like to review :-)</div><div><br></div><div>Chris</div></body></html>