<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - SAL_USE_VCLPLUGIN=qt5: Fonts, tooltips, toolbar icons way too large"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=122131#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - SAL_USE_VCLPLUGIN=qt5: Fonts, tooltips, toolbar icons way too large"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=122131">bug 122131</a>
from <span class="vcard"><a class="email" href="mailto:glogow@fbihome.de" title="Jan-Marek Glogowski <glogow@fbihome.de>"> <span class="fn">Jan-Marek Glogowski</span></a>
</span></b>
<pre>(In reply to Bernhard Rosenkraenzer from <a href="show_bug.cgi?id=122131#c6">comment #6</a>)
<span class="quote">> The interesting part is probably physicalSize (and the resulting
> physicalDotsPerInch). Those numbers look off... (but KDE and other Qt
> applications look perfect).
>
> logicalDotsPerInch: 96
> physicalDotsPerInch: 304.8
> physicalSize: QSizeF(160, 90)</span >
Yup - that would be a tiny screen, as it's in mm...
xdpyinfo seems more correct with "508x317 millimeters"; not sure if this is a
guess based on the 96 DPI or on real data.
The icons are roughly scaled 3x when I tried to measure their rectangle using
gimp, so that would correspond to logicalDotsPerInch : physicalDotsPerInch.
Currently Qt5Font uses QFont::setPixelSize to set the font size. Quoting the
docs: "Using this function makes the font device dependent. Use setPointSize()
or setPointSizeF() to set the size of the font in a device independent manner."
So in theory
- setPixelSize(rFSP.mnHeight);
+ setPointSizeF(rFSP.mfExactHeight * 72.0 /
QGuiApplication::primaryScreen()->logicalDotsPerInch());
should fix your problem. Docs for QScreen::logicalDotsPerInch claim "this value
can be used to convert font point sizes to pixel sizes".
My final patch is a bit different. LO still looks ok for me, but I have no
idea, if this would work for you.
Maybe this needs adaption of Qt5Font::ImplGetGlyphBoundRect too
Can you test the patch at <a href="https://gerrit.libreoffice.org/#/c/65696/">https://gerrit.libreoffice.org/#/c/65696/</a> ?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>