<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/123458/">https://git.reviewboard.kde.org/r/123458/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDE Software on Mac OS X and Qt KDE.</div>
<div>By René J.V. Bertin.</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
qt
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Handling of and support for less common font weight/style combinations is far from ideal on OS X but not perfect on Linux either. It is not difficult to run into typefaces that will not be restored properly from settings files for instance, because QFont(family,weight,style) and other methods to obtain a QFont from a font description do not return the appropriate font.
This is especially the case on OS X where the code makes the assumption in at least two locations that anything that isn't "Normal" is "Bold". In other places, including generic code, parsers apply overly course numberic weight classifications or fail to consider weights like "Medium", "Semibold", "Regular", "Roman" etc. (and return a fall-back weight: Normal).
Among the font families that are affected there are als common fonts like Segoe UI and Helvetica Neue (UI fonts on MS Windows and OS X 10.10+). NB: medium/semi-/demi-bold weights are perfect in UIs on high-resolution screens.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The proposed patch improves the code by adding additional checks against style names and weights. The changes are not only to Mac-specific files so Linux benefits from this too (and other platforms ought to, as well).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I'm putting it up for review on here mainly for lack of time to figure out why I failed to get in onto Qt's own code review site. It may appear there too, but if not:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I herewith put the attached code changes in the public domain, for possible inclusion into the Qt 4.x codebase under the license that governs that software.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">On OS X 10.9.5 and Kubuntu 14.04.2 against Qt 4.8.7 with the qtconfig utility and the attached test application</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/gui/dialogs/qfontdialog.cpp <span style="color: grey">(d791462)</span></li>
<li>src/gui/dialogs/qfontdialog_mac.mm <span style="color: grey">(d557a7a)</span></li>
<li>src/gui/kernel/qt_mac.cpp <span style="color: grey">(fb241ce)</span></li>
<li>src/gui/text/qfontdatabase.cpp <span style="color: grey">(4c2ace4)</span></li>
<li>src/gui/text/qfontdatabase_mac.cpp <span style="color: grey">(816a7bd)</span></li>
<li>src/gui/text/qfontengine_coretext.mm <span style="color: grey">(204d685)</span></li>
<li>src/plugins/platforms/fontdatabases/coretext/qcoretextfontdatabase.mm <span style="color: grey">(312015f)</span></li>
<li>tools/qtconfig/mainwindow.cpp <span style="color: grey">(1bb6e4e)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/123458/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/bbebc0af-e457-4fdf-965c-3918d8e871d0__fontweightissue.pro">fontweight issue test application</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/cfdcbf23-406a-4abf-b0cb-5fdc1957dfe9__main.cpp">fontweight issue test application</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/9898afae-82ca-4c92-b7d9-5607d0dd8e24__dialog.h">fontweight issue test application</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/8ad258bf-7f82-4db4-a344-ce81d75e8c50__dialog.cpp">fontweight issue test application</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/2f0a7c6e-4601-406e-b703-603a36bff62b__fontweightissue.desktop">fontweight issue test application</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>