Re: Review Request 123458: Improvements to the handling of font weights and styles

2015-04-22 Thread Allan Sandfeld Jensen
On Wednesday 22 April 2015, René J.V. Bertin wrote:
  On April 22, 2015, 12:40 a.m., Luigi Toscano wrote:
   I think this should go to Qt (I think it's quite difficult they will
   accept it, as Qt4 is in hard freeze mode), and they will probably ask
   to see if it applies to Qt5 as well. We just mirror Qt... not sure how
   to handle this.
  
  Luigi Toscano wrote:
  Yes, I know you wrote that it should go to Qt, just stating that I'm
  not sure how to handle this patch in our Qt mirrors.
  
  Aleix Pol Gonzalez wrote:
  +1, we shouldn't go about maintaining a patched Qt4 fork.
  
  Ben Cooksley wrote:
  Our Qt mirrors are configured to be exact copies of the upstream
  code.qt.io mirrors, therefore any patches have to go through Qt
  Project to form part of our mirrors of it.
 
 It didn't even cross my mind to commit this patch to the Qt4 fork, just to
 put it up for review (and make it available publicly).
 
 Oh, and if someone were to beat me to putting this up on Qt's code review
 site, I'd actually appreciate that, a lot even O:-)
 
 
Similar changes are already in Qt5. At least the font weights are greatly 
expanded in 5.5.

`Allan


Re: Review Request 123458: Improvements to the handling of font weights and styles

2015-04-21 Thread René J . V . Bertin

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123458/
---

(Updated April 22, 2015, 12:01 a.m.)


Review request for KDE Software on Mac OS X and Qt KDE.


Repository: qt


Description
---

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.

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).

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:

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.


Diffs (updated)
-

  src/gui/dialogs/qfontdialog.cpp d791462 
  src/gui/dialogs/qfontdialog_mac.mm d557a7a 
  src/gui/kernel/qt_mac.cpp fb241ce 
  src/gui/text/qfontdatabase.cpp 4c2ace4 
  src/gui/text/qfontdatabase_mac.cpp 816a7bd 
  src/gui/text/qfontengine_coretext.mm 204d685 
  src/plugins/platforms/fontdatabases/coretext/qcoretextfontdatabase.mm 312015f 
  tools/qtconfig/mainwindow.cpp 1bb6e4e 

Diff: https://git.reviewboard.kde.org/r/123458/diff/


Testing
---

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


File Attachments


fontweight issue test application
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/bbebc0af-e457-4fdf-965c-3918d8e871d0__fontweightissue.pro
fontweight issue test application
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/cfdcbf23-406a-4abf-b0cb-5fdc1957dfe9__main.cpp
fontweight issue test application
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/9898afae-82ca-4c92-b7d9-5607d0dd8e24__dialog.h
fontweight issue test application
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/8ad258bf-7f82-4db4-a344-ce81d75e8c50__dialog.cpp
fontweight issue test application
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/2f0a7c6e-4601-406e-b703-603a36bff62b__fontweightissue.desktop


Thanks,

René J.V. Bertin



Re: Review Request 123458: Improvements to the handling of font weights and styles

2015-04-21 Thread René J . V . Bertin

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123458/
---

(Updated April 22, 2015, 12:06 a.m.)


Review request for KDE Software on Mac OS X and Qt KDE.


Repository: qt


Description
---

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.

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).

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:

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.


Diffs (updated)
-

  src/gui/dialogs/qfontdialog.cpp d791462 
  src/gui/dialogs/qfontdialog_mac.mm d557a7a 
  src/gui/kernel/qt_mac.cpp fb241ce 
  src/gui/text/qfontdatabase.cpp 4c2ace4 
  src/gui/text/qfontdatabase_mac.cpp 816a7bd 
  src/gui/text/qfontengine_coretext.mm 204d685 
  src/plugins/platforms/fontdatabases/coretext/qcoretextfontdatabase.mm 312015f 
  tools/qtconfig/mainwindow.cpp 1bb6e4e 

Diff: https://git.reviewboard.kde.org/r/123458/diff/


Testing
---

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


File Attachments


fontweight issue test application
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/bbebc0af-e457-4fdf-965c-3918d8e871d0__fontweightissue.pro
fontweight issue test application
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/cfdcbf23-406a-4abf-b0cb-5fdc1957dfe9__main.cpp
fontweight issue test application
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/9898afae-82ca-4c92-b7d9-5607d0dd8e24__dialog.h
fontweight issue test application
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/8ad258bf-7f82-4db4-a344-ce81d75e8c50__dialog.cpp
fontweight issue test application
  
https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/2f0a7c6e-4601-406e-b703-603a36bff62b__fontweightissue.desktop


Thanks,

René J.V. Bertin



Re: Review Request 123458: Improvements to the handling of font weights and styles

2015-04-21 Thread Luigi Toscano


 On April 22, 2015, 12:40 a.m., Luigi Toscano wrote:
  I think this should go to Qt (I think it's quite difficult they will accept 
  it, as Qt4 is in hard freeze mode), and they will probably ask to see if it 
  applies to Qt5 as well.
  We just mirror Qt... not sure how to handle this.

Yes, I know you wrote that it should go to Qt, just stating that I'm not sure 
how to handle this patch in our Qt mirrors.


- Luigi


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123458/#review79313
---


On April 22, 2015, 12:06 a.m., René J.V. Bertin wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/123458/
 ---
 
 (Updated April 22, 2015, 12:06 a.m.)
 
 
 Review request for KDE Software on Mac OS X and Qt KDE.
 
 
 Repository: qt
 
 
 Description
 ---
 
 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.
 
 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).
 
 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:
 
 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.
 
 
 Diffs
 -
 
   src/gui/dialogs/qfontdialog.cpp d791462 
   src/gui/dialogs/qfontdialog_mac.mm d557a7a 
   src/gui/kernel/qt_mac.cpp fb241ce 
   src/gui/text/qfontdatabase.cpp 4c2ace4 
   src/gui/text/qfontdatabase_mac.cpp 816a7bd 
   src/gui/text/qfontengine_coretext.mm 204d685 
   src/plugins/platforms/fontdatabases/coretext/qcoretextfontdatabase.mm 
 312015f 
   tools/qtconfig/mainwindow.cpp 1bb6e4e 
 
 Diff: https://git.reviewboard.kde.org/r/123458/diff/
 
 
 Testing
 ---
 
 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
 
 
 File Attachments
 
 
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/bbebc0af-e457-4fdf-965c-3918d8e871d0__fontweightissue.pro
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/cfdcbf23-406a-4abf-b0cb-5fdc1957dfe9__main.cpp
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/9898afae-82ca-4c92-b7d9-5607d0dd8e24__dialog.h
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/8ad258bf-7f82-4db4-a344-ce81d75e8c50__dialog.cpp
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/2f0a7c6e-4601-406e-b703-603a36bff62b__fontweightissue.desktop
 
 
 Thanks,
 
 René J.V. Bertin
 




Re: Review Request 123458: Improvements to the handling of font weights and styles

2015-04-21 Thread Ben Cooksley


 On April 21, 2015, 10:40 p.m., Luigi Toscano wrote:
  I think this should go to Qt (I think it's quite difficult they will accept 
  it, as Qt4 is in hard freeze mode), and they will probably ask to see if it 
  applies to Qt5 as well.
  We just mirror Qt... not sure how to handle this.
 
 Luigi Toscano wrote:
 Yes, I know you wrote that it should go to Qt, just stating that I'm not 
 sure how to handle this patch in our Qt mirrors.
 
 Aleix Pol Gonzalez wrote:
 +1, we shouldn't go about maintaining a patched Qt4 fork.

Our Qt mirrors are configured to be exact copies of the upstream code.qt.io 
mirrors, therefore any patches have to go through Qt Project to form part of 
our mirrors of it.


- Ben


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123458/#review79313
---


On April 21, 2015, 10:06 p.m., René J.V. Bertin wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/123458/
 ---
 
 (Updated April 21, 2015, 10:06 p.m.)
 
 
 Review request for KDE Software on Mac OS X and Qt KDE.
 
 
 Repository: qt
 
 
 Description
 ---
 
 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.
 
 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).
 
 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:
 
 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.
 
 
 Diffs
 -
 
   src/gui/dialogs/qfontdialog.cpp d791462 
   src/gui/dialogs/qfontdialog_mac.mm d557a7a 
   src/gui/kernel/qt_mac.cpp fb241ce 
   src/gui/text/qfontdatabase.cpp 4c2ace4 
   src/gui/text/qfontdatabase_mac.cpp 816a7bd 
   src/gui/text/qfontengine_coretext.mm 204d685 
   src/plugins/platforms/fontdatabases/coretext/qcoretextfontdatabase.mm 
 312015f 
   tools/qtconfig/mainwindow.cpp 1bb6e4e 
 
 Diff: https://git.reviewboard.kde.org/r/123458/diff/
 
 
 Testing
 ---
 
 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
 
 
 File Attachments
 
 
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/bbebc0af-e457-4fdf-965c-3918d8e871d0__fontweightissue.pro
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/cfdcbf23-406a-4abf-b0cb-5fdc1957dfe9__main.cpp
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/9898afae-82ca-4c92-b7d9-5607d0dd8e24__dialog.h
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/8ad258bf-7f82-4db4-a344-ce81d75e8c50__dialog.cpp
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/2f0a7c6e-4601-406e-b703-603a36bff62b__fontweightissue.desktop
 
 
 Thanks,
 
 René J.V. Bertin
 




Re: Review Request 123458: Improvements to the handling of font weights and styles

2015-04-21 Thread René J . V . Bertin


 On April 22, 2015, 12:40 a.m., Luigi Toscano wrote:
  I think this should go to Qt (I think it's quite difficult they will accept 
  it, as Qt4 is in hard freeze mode), and they will probably ask to see if it 
  applies to Qt5 as well.
  We just mirror Qt... not sure how to handle this.
 
 Luigi Toscano wrote:
 Yes, I know you wrote that it should go to Qt, just stating that I'm not 
 sure how to handle this patch in our Qt mirrors.
 
 Aleix Pol Gonzalez wrote:
 +1, we shouldn't go about maintaining a patched Qt4 fork.
 
 Ben Cooksley wrote:
 Our Qt mirrors are configured to be exact copies of the upstream 
 code.qt.io mirrors, therefore any patches have to go through Qt Project to 
 form part of our mirrors of it.

It didn't even cross my mind to commit this patch to the Qt4 fork, just to put 
it up for review (and make it available publicly).

Oh, and if someone were to beat me to putting this up on Qt's code review site, 
I'd actually appreciate that, a lot even O:-)


- René J.V.


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123458/#review79313
---


On April 22, 2015, 12:06 a.m., René J.V. Bertin wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/123458/
 ---
 
 (Updated April 22, 2015, 12:06 a.m.)
 
 
 Review request for KDE Software on Mac OS X and Qt KDE.
 
 
 Repository: qt
 
 
 Description
 ---
 
 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.
 
 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).
 
 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:
 
 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.
 
 
 Diffs
 -
 
   src/gui/dialogs/qfontdialog.cpp d791462 
   src/gui/dialogs/qfontdialog_mac.mm d557a7a 
   src/gui/kernel/qt_mac.cpp fb241ce 
   src/gui/text/qfontdatabase.cpp 4c2ace4 
   src/gui/text/qfontdatabase_mac.cpp 816a7bd 
   src/gui/text/qfontengine_coretext.mm 204d685 
   src/plugins/platforms/fontdatabases/coretext/qcoretextfontdatabase.mm 
 312015f 
   tools/qtconfig/mainwindow.cpp 1bb6e4e 
 
 Diff: https://git.reviewboard.kde.org/r/123458/diff/
 
 
 Testing
 ---
 
 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
 
 
 File Attachments
 
 
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/bbebc0af-e457-4fdf-965c-3918d8e871d0__fontweightissue.pro
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/cfdcbf23-406a-4abf-b0cb-5fdc1957dfe9__main.cpp
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/9898afae-82ca-4c92-b7d9-5607d0dd8e24__dialog.h
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/8ad258bf-7f82-4db4-a344-ce81d75e8c50__dialog.cpp
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/2f0a7c6e-4601-406e-b703-603a36bff62b__fontweightissue.desktop
 
 
 Thanks,
 
 René J.V. Bertin
 




Re: Review Request 123458: Improvements to the handling of font weights and styles

2015-04-21 Thread Luigi Toscano

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123458/#review79313
---


I think this should go to Qt (I think it's quite difficult they will accept it, 
as Qt4 is in hard freeze mode), and they will probably ask to see if it applies 
to Qt5 as well.
We just mirror Qt... not sure how to handle this.

- Luigi Toscano


On April 22, 2015, 12:06 a.m., René J.V. Bertin wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/123458/
 ---
 
 (Updated April 22, 2015, 12:06 a.m.)
 
 
 Review request for KDE Software on Mac OS X and Qt KDE.
 
 
 Repository: qt
 
 
 Description
 ---
 
 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.
 
 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).
 
 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:
 
 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.
 
 
 Diffs
 -
 
   src/gui/dialogs/qfontdialog.cpp d791462 
   src/gui/dialogs/qfontdialog_mac.mm d557a7a 
   src/gui/kernel/qt_mac.cpp fb241ce 
   src/gui/text/qfontdatabase.cpp 4c2ace4 
   src/gui/text/qfontdatabase_mac.cpp 816a7bd 
   src/gui/text/qfontengine_coretext.mm 204d685 
   src/plugins/platforms/fontdatabases/coretext/qcoretextfontdatabase.mm 
 312015f 
   tools/qtconfig/mainwindow.cpp 1bb6e4e 
 
 Diff: https://git.reviewboard.kde.org/r/123458/diff/
 
 
 Testing
 ---
 
 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
 
 
 File Attachments
 
 
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/bbebc0af-e457-4fdf-965c-3918d8e871d0__fontweightissue.pro
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/cfdcbf23-406a-4abf-b0cb-5fdc1957dfe9__main.cpp
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/9898afae-82ca-4c92-b7d9-5607d0dd8e24__dialog.h
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/8ad258bf-7f82-4db4-a344-ce81d75e8c50__dialog.cpp
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/2f0a7c6e-4601-406e-b703-603a36bff62b__fontweightissue.desktop
 
 
 Thanks,
 
 René J.V. Bertin
 




Re: Review Request 123458: Improvements to the handling of font weights and styles

2015-04-21 Thread Aleix Pol Gonzalez


 On April 22, 2015, 12:40 a.m., Luigi Toscano wrote:
  I think this should go to Qt (I think it's quite difficult they will accept 
  it, as Qt4 is in hard freeze mode), and they will probably ask to see if it 
  applies to Qt5 as well.
  We just mirror Qt... not sure how to handle this.
 
 Luigi Toscano wrote:
 Yes, I know you wrote that it should go to Qt, just stating that I'm not 
 sure how to handle this patch in our Qt mirrors.

+1, we shouldn't go about maintaining a patched Qt4 fork.


- Aleix


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123458/#review79313
---


On April 22, 2015, 12:06 a.m., René J.V. Bertin wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/123458/
 ---
 
 (Updated April 22, 2015, 12:06 a.m.)
 
 
 Review request for KDE Software on Mac OS X and Qt KDE.
 
 
 Repository: qt
 
 
 Description
 ---
 
 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.
 
 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).
 
 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:
 
 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.
 
 
 Diffs
 -
 
   src/gui/dialogs/qfontdialog.cpp d791462 
   src/gui/dialogs/qfontdialog_mac.mm d557a7a 
   src/gui/kernel/qt_mac.cpp fb241ce 
   src/gui/text/qfontdatabase.cpp 4c2ace4 
   src/gui/text/qfontdatabase_mac.cpp 816a7bd 
   src/gui/text/qfontengine_coretext.mm 204d685 
   src/plugins/platforms/fontdatabases/coretext/qcoretextfontdatabase.mm 
 312015f 
   tools/qtconfig/mainwindow.cpp 1bb6e4e 
 
 Diff: https://git.reviewboard.kde.org/r/123458/diff/
 
 
 Testing
 ---
 
 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
 
 
 File Attachments
 
 
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/bbebc0af-e457-4fdf-965c-3918d8e871d0__fontweightissue.pro
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/cfdcbf23-406a-4abf-b0cb-5fdc1957dfe9__main.cpp
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/9898afae-82ca-4c92-b7d9-5607d0dd8e24__dialog.h
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/8ad258bf-7f82-4db4-a344-ce81d75e8c50__dialog.cpp
 fontweight issue test application
   
 https://git.reviewboard.kde.org/media/uploaded/files/2015/04/21/2f0a7c6e-4601-406e-b703-603a36bff62b__fontweightissue.desktop
 
 
 Thanks,
 
 René J.V. Bertin