[Libreoffice-bugs] [Bug 127471] Copied calc diagram in gdi format looks ok under linux, but the fonts looks weird under windows.

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Sep 10 12:34:23 UTC 2019


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

--- Comment #6 from Ilhan Yesil <ilhanyesil at gmx.de> ---
in drawinglayer/source/primitive2d/textlayoutdevice.cxx
in function: vcl::Font getVclFontFromFontAttribute

if I comment out the lines:

 #ifdef _WIN32
             // for WIN32 systems, correct the FontWidth if FontScaling is used
             if(bFontIsScaled && nHeight > 0)
             {
                 const FontMetric
aUnscaledFontMetric(Application::GetDefaultDevice()->GetFontMetric(aRetval));

                 if(aUnscaledFontMetric.GetAverageFontWidth() > 0)
                 {
                    const double fScaleFactor(static_cast<double>(nWidth) /
static_cast<double>(nHeight));
                    const sal_uInt32
nScaledWidth(basegfx::fround(static_cast<double>(aUnscaledFontMetric.GetAverageFontWidth())
* fScaleFactor));
                    aRetval.SetAverageFontWidth(nScaledWidth);
                 }
             }
 #endif

then the output under Windows is no longer wrong. 

I haven't see side effects so far, if I comment out these lines. Maybe this is
an approach to solve this, somehow it has to do with the scale factor of fonts
under windows.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190910/7e32ea6f/attachment.html>


More information about the Libreoffice-bugs mailing list