<table><tr><td style="">AndreyYashkin created this revision.<br />AndreyYashkin added a reviewer: Okular.<br />AndreyYashkin added a project: Okular.<br />AndreyYashkin requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D23012">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Now <em>fontBoundaries</em> always has smaller width than <em>boundingRect</em> from</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">void QPainter::drawText(const QRect &rectangle, int flags, const QString &text, QRect *boundingRect = nullptr)</pre></div>
<p>which is required to enclose the whole text. The difference is only several pixels, but sometimes it can cause visual problems. You can see the sidebar without and with this patch in Russian language with Noto Sans 10pt font on a picture below.<br />
<a href="https://phabricator.kde.org/F7177644" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">F7177644: изображение.png</a><br />
Now the first and the last symbols are fully visible.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D23012">https://phabricator.kde.org/D23012</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>ui/sidebar.cpp</div></div></div><br /><div><strong>To: </strong>AndreyYashkin, Okular<br /><strong>Cc: </strong>okular-devel, maguirre, fbampaloukas, joaonetto, kezik, tfella, ngraham, darcyshen, aacid<br /></div>