https://bugs.documentfoundation.org/show_bug.cgi?id=174501

--- Comment #6 from Patrick (volunteer) <[email protected]> ---
I can confirm that commit f7cff4b832e2860da73437b4d07295235f97c674 is causing
this. I was able to narrow the cause down to one specific part of gio's patch
in the debug patch below.

I quickly get lost looking at the Base forms code. But after some
experimentation, I found that letting only Arial fonts with a size of 10 run
the code that gio's patch disabled on macOS increases the size of the database
data strings in my test form. This font is apparently only set a few times when
loading my test form so I was able to get some stack traces of what calls this
code.

Hopefully, I can find what code is setting the size 10 Arial font when I have
time to look through the stack traces. Then I can hopefully use gio's trick of
switching the MapUnit from MapUnit::MapPoint to MapUnit::MapPixel or vice
versa.

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 0aa412185171..f36f503f7873 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1373,7 +1373,10 @@ void Window::ImplPointToLogic(vcl::RenderContext const&
rRenderContext, vcl::Fon
     // already are VCL's logical (device independent) pixels; the display
     // scaling is handled by the window's backing store. Applying the screen
DPI
     // here would scale the text twice, so keep the point size as-is.
-#ifndef MACOSX
+// #ifndef MACOSX
+if (aSize.Height() == 10 && rFont.GetFamilyName() == "Arial")
+{
+usleep(1);
     if (aSize.Width())
     {
         aSize.setWidth(aSize.Width() * mpWindowImpl->mpFrameData->mnDPIX);
@@ -1383,7 +1386,8 @@ void Window::ImplPointToLogic(vcl::RenderContext const&
rRenderContext, vcl::Fon
     aSize.setHeight(aSize.Height() * mpWindowImpl->mpFrameData->mnDPIY);
     aSize.AdjustHeight(72/2 );
     aSize.setHeight( aSize.Height() / 72 );
-#endif
+}
+// #endif

     aSize = rRenderContext.PixelToLogic(aSize);

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to