<table><tr><td style="">ahmadsamir created this revision.<br />ahmadsamir added reviewers: Frameworks, dfaure, davidedmundson, cfeck, ervin.<br />Herald added a project: Frameworks.<br />ahmadsamir 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/D27735">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>If the styleName property is set for a QFont, using setBold(true) would<br />
lead to Qt using an "emboldended"/synthetic font style instead of using<br />
the bold style provided by the font itself (usually as a standalone font<br />
file), the former looks ugly (IIUC, Freetype emboldens fonts as a last<br />
resort for fonts that don't provide a bold style at all).</p>
<p>Accoring to upstream[1] the styleName property is useful for fonts with<br />
fancy style names, and also it shouldn't be set if it's not needed; and<br />
indeed using styleName with e.g. "Regular" doesn't make sense, as there<br />
is no "Regular Bold" style AFAICS.</p>
<p>Checking for "Regular|Normal|Book|Roman" is based on examining the font<br />
styles provided by the font packages available on OpenSuse Tumbleweed ATM,<br />
and not checking for some of the weird/non-common ones e.g. I've seen "Roma"<br />
and "Rounded".</p>
<p>For more details see:<br />
[1] <a href="https://bugreports.qt.io/browse/QTBUG-63792" class="remarkup-link" target="_blank" rel="noreferrer">https://bugreports.qt.io/browse/QTBUG-63792</a><br />
<a href="https://bugs.kde.org/show_bug.cgi?id=378523" class="remarkup-link" target="_blank" rel="noreferrer">https://bugs.kde.org/show_bug.cgi?id=378523</a></p>
<p>BUG: 378523</p>
<p>FIXED-IN: 5.68</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>All unit tests still pass.</p>
<p>Changing the fonts via e.g. the fonts KCM doesn't append the font sytleName,<br />
to the relevant font config entry, if the "Regular" style or co. is used.</p>
<p>A simple test, look at the current dir name in the Dolphin url bar with<br />
and without ",Regular" appended to the font= entry (assuming you're using<br />
Noto Sans or DejaVu Sans as the styleName varies from font to font).</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R237 KConfig</div></div></div><br /><div><strong>BRANCH</strong><div><div>l-font-sytleName (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D27735">https://phabricator.kde.org/D27735</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/gui/kconfiggroupgui.cpp</div></div></div><br /><div><strong>To: </strong>ahmadsamir, Frameworks, dfaure, davidedmundson, cfeck, ervin<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns<br /></div>