[Development] QFont::setFamily("monospace") on OS X

2016-01-21 Thread René J . V . Bertin
Hello,

Not sure if this is the best place to ask:
I think QFont::setFamily("monospace") should allow to obtain an appropriate 
monospace font on all platforms. It does with the XCB QPA , giving me the 
Consolas font (ideally it should return the fixed-width font that goes with the 
active (platform) style, though).
On OS X with the cocoa QPA however, this gives Lucida Grande, i.e. the system 
fallback font.

I suppose that's a bug, or is there a reason why this doesn't work as expected?

Cf: https://bugreports.qt.io/browse/QTBUG-50564

R.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] QFont::setFamily("monospace") on OS X

2016-01-21 Thread René J . V . Bertin
On Thursday January 21 2016 20:31:52 Liang Qi wrote:

Possibly, but that function takes a font type, not a family name. So it's 
probably the culprit only if it is called with the FixedFont type after someone 
did setFamily("monospace").

R.

> Perhaps QPlatformTheme::font() is related.
> 
> https://github.com/qtproject/qtbase/blob/5.6/src/gui/kernel/qplatformtheme.h
> 
> Regards,
> Liang
> 
> On 21 January 2016 at 18:29, René J.V.  wrote:
> 
> > Hello,
> >
> > Not sure if this is the best place to ask:
> > I think QFont::setFamily("monospace") should allow to obtain an
> > appropriate monospace font on all platforms. It does with the XCB QPA ,
> > giving me the Consolas font (ideally it should return the fixed-width font
> > that goes with the active (platform) style, though).
> > On OS X with the cocoa QPA however, this gives Lucida Grande, i.e. the
> > system fallback font.
> >
> > I suppose that's a bug, or is there a reason why this doesn't work as
> > expected?
> >
> > Cf: https://bugreports.qt.io/browse/QTBUG-50564
> >
> > R.
> > ___
> > Development mailing list
> > Development@qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/development
> >
> 
> 
> 
> 

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] QFont::setFamily("monospace") on OS X

2016-01-21 Thread Liang Qi
Perhaps QPlatformTheme::font() is related.

https://github.com/qtproject/qtbase/blob/5.6/src/gui/kernel/qplatformtheme.h

Regards,
Liang

On 21 January 2016 at 18:29, René J.V.  wrote:

> Hello,
>
> Not sure if this is the best place to ask:
> I think QFont::setFamily("monospace") should allow to obtain an
> appropriate monospace font on all platforms. It does with the XCB QPA ,
> giving me the Consolas font (ideally it should return the fixed-width font
> that goes with the active (platform) style, though).
> On OS X with the cocoa QPA however, this gives Lucida Grande, i.e. the
> system fallback font.
>
> I suppose that's a bug, or is there a reason why this doesn't work as
> expected?
>
> Cf: https://bugreports.qt.io/browse/QTBUG-50564
>
> R.
> ___
> Development mailing list
> Development@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>



-- 
http://www.qiliang.net
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development