[PyQt] PYQt defaults to fonts looking bold on macOS but C++ Qt does not

Phil Thompson phil at riverbankcomputing.com
Tue Jul 26 17:43:44 BST 2016


On 26 Jul 2016, at 5:20 pm, Barry Scott <barry at barrys-emacs.org> wrote:
> 
> On Tuesday, 26 July 2016 13:10:36 BST Barry Scott wrote:
>>> On 6 Jul 2016, at 11:50, Phil Thompson <phil at riverbankcomputing.com>
>>> wrote:
>>> 
>>> On 6 Jul 2016, at 11:26 am, Barry Scott <barry at barrys-emacs.org> wrote:
>>>> Compare the windows snapshots taken for a PyQt5 app and a C++ Qt5 app
>>>> that use a QLabel control.
>>>> 
>>>> http://www.barrys-emacs.org/export/Qt5.png
>>>> 
>>>> http://www.barrys-emacs.org/export/PyQt5.png
>>>> 
>>>> You can see that the text in PyQt5 looks like it is bold compared to the
>>>> Qt5 version.
>>>> 
>>>> On Fedora I see that same text for Qt5 and PyQT5.
>>>> 
>>>> Please fix this problem in PyQt5.
>>>> 
>>>> The source code I used is in:
>>>> 
>>>> http://barrys-emacs.org/export/font-example.tar.gz
>>>> 
>>>> Note: This bug affects all text, list, tables, line edit everything.
>>> 
>>> ...on your system. It works fine for me. PyQt does nothing with fonts.
>> 
>> Phil,
>> 
>> I know what macOS preference changes this behaviour.
>> 
>> In "System Preferences…”, “General” there is a property,
>> “Use LCD font smoothing when available” (bottom of the dialog).
>> If this is ticked PyQt5 text is bold in appearance.
>> When it is not ticked it looks normal.
>> 
>> But this setting does not change the output of a Qt5 C++ app.
>> 
>> Can you reproduce this problem now?
> 
> Now I can show command line PyQt5 program shows bold text but
> command line C++ app does not.
> 
> Have I done enough to show that this is a problem with PyQt5 responding
> in an undesirable way to LCD smoothing option? And that its not a quirk of
> my Mac.
> 
> I am assuming that you can reproduce the problem I'm reporting with the
> LCD smoothing option enabled.

No I can't. My Mac defaults to that option being set anyway.

Phil


More information about the PyQt mailing list