<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 30, 2022 at 2:26 AM Chris Sherlock <<a href="mailto:chris.sherlock79@gmail.com">chris.sherlock79@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div 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 <<a href="mailto:caolanm@redhat.com" target="_blank">caolanm@redhat.com</a>> 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="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="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="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" target="_blank">https://gerrit.libreoffice.org/c/core/+/142006</a> if anyone would like to review :-)</div><div><br></div><div>Chris</div></div></blockquote><div><br></div><div><div>A polite ping to the mailing list as people are now asking me for
the rationale behind the patch, could someone please advise the way
forward?</div><div><br></div><div>Chris</div> </div></div></div>