Re: [Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?
On Mon, Mar 21, 2016 at 4:30 PM, Allan Sandfeld Jensen wrote: > On Monday 21 March 2016, René J. V. Bertin wrote: > > > For further comparison, here's a screenshot showing > > > > > > CoreText vs Cocoa+Freetype vs XCB+Freetype+Fontconfig > > > > > > all on OS X, using a theme & style based on QtCurve. > > > > > > The XCB+Freetype rendering is hands-down the easiest on the eyes for me, > > > though that's of course all in the eye of the beholder. It'd be nice if > > > the same quality could be attained with the Cocoa QPA. > > > > > > I'd be interested in testing different ways to get the text colour right > > > (backported to 5.6 though ;)). > > > > > I would suggest trying to change QCocoaIntegration::styleHint > > and return 1.0 for QPlatformIntegration::FontSmoothingGamma instead of > 2.0. > > > I've found that using the freetype font engine dramatically improves performance in parts of our application that do a lot of text rendering. Is there any way to set this style hint without actually modifying the QCocoaIntegration source code and rebuilding Qt? We'd like to be able to give users of our application the ability to play around with these settings some. Thanks Adam ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?
René J.V. Bertin wrote: Hi again, > mOptions.testFlag(UseFreeTypeFontEngine)? 1.0 : 2.0 In fact, 0.95 may work even better than 1.0 . R. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?
On Monday 21 March 2016, René J. V. Bertin wrote: > For further comparison, here's a screenshot showing > > CoreText vs Cocoa+Freetype vs XCB+Freetype+Fontconfig > > all on OS X, using a theme & style based on QtCurve. > > The XCB+Freetype rendering is hands-down the easiest on the eyes for me, > though that's of course all in the eye of the beholder. It'd be nice if > the same quality could be attained with the Cocoa QPA. > > I'd be interested in testing different ways to get the text colour right > (backported to 5.6 though ;)). > I would suggest trying to change QCocoaIntegration::styleHint and return 1.0 for QPlatformIntegration::FontSmoothingGamma instead of 2.0. `Allan ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?
For further comparison, here's a screenshot showing CoreText vs Cocoa+Freetype vs XCB+Freetype+Fontconfig all on OS X, using a theme & style based on QtCurve. The XCB+Freetype rendering is hands-down the easiest on the eyes for me, though that's of course all in the eye of the beholder. It'd be nice if the same quality could be attained with the Cocoa QPA. I'd be interested in testing different ways to get the text colour right (backported to 5.6 though ;)). R. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?
On Monday 21 March 2016, René J. V. Bertin wrote: > Allan Sandfeld Jensen wrote: > > If the right one is freetype, it looks like it didn't disable font gamma- > > It is. > > > correction. We usually disable that when using freetype, since they don't > > have stem darkening, and thus gets must paler text-colors when fonts are > > antialiased. > > Do you disable it in the Freetype code, or in the Freetype fontengine? > No, it is a technically a platform setting in Qt for our font-rendering gamma. When I first fixed the issue of pale text colors on Linux with Qt5, I just forced the gamma value for the xcb-plugin to 1.0, but when freetype support was added for Windows, there was also added another way of disabling font gamma correction when freetype was used on Windows. Something similar could potentially be missing for OS X, which is why I commented on the color. Regards `Allan ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?
Allan Sandfeld Jensen wrote: > If the right one is freetype, it looks like it didn't disable font gamma- It is. > correction. We usually disable that when using freetype, since they don't have > stem darkening, and thus gets must paler text-colors when fonts are > antialiased. Do you disable it in the Freetype code, or in the Freetype fontengine? This snap was made with Freetype 2.6.2 with Bohoomil's Infinality patches. It is not impossible that part of the paler colour is due to the fact that optimal rendering with Infinality is obtained through dedicated fontconfig profiles, and from what I understand there's no support for those yet in the cocoa QPA. Infinality sets INFINALITY_FT_GAMMA_CORRECTION="0 100" by default, if that means anything to you. R. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?
On Monday 21 March 2016, René J.V. Bertin wrote: > On Friday March 18 2016 14:15:32 Sergio Martins wrote: > > To get parameters passed to QCocoaIntegration::QCocoaIntegration(), you > > should use -platform cocoa:fontengine=freetype, which I haven't tried, > > but similar works for me on Windows. > > FWIW, here's a small preview of CoreText vs. Freetype rendering and font > name/weight/style representation. > If the right one is freetype, it looks like it didn't disable font gamma- correction. We usually disable that when using freetype, since they don't have stem darkening, and thus gets must paler text-colors when fonts are antialiased. `Allan ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?
On Friday March 18 2016 14:15:32 Sergio Martins wrote: > To get parameters passed to QCocoaIntegration::QCocoaIntegration(), you > should > use -platform cocoa:fontengine=freetype, which I haven't tried, but similar > works for me on Windows. FWIW, here's a small preview of CoreText vs. Freetype rendering and font name/weight/style representation. R.___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?
On Friday, March 18, 2016 02:52:42 PM René J. V. Bertin wrote: > Till Oliver Knoll wrote: > > According to > > > > https://wiki.qt.io/New_Features_in_Qt_5.6 > > > > "Optional support for using FreeType on Mac OS X" is now available. > > Yeah, but apparently not exactly as planned: Where was --fontengine=freetype planed, or where did you see it would work ? > > %> Assistant.app/Contents/MacOS/Assistant --fontengine=freetype > QCocoaIntegration::Options parseOptions(const QStringList &) paramList= () > Unknown option: --fontengine=freetype > > > Usage: assistant [Options] > > > %> Qt\ Creator.app/Contents/MacOS/Qt\ Creator --fontengine=freetype > QCocoaIntegration::Options parseOptions(const QStringList &) paramList= () > Unknown option --fontengine=freetype > Usage: Qt Creator [OPTION]... [FILE]... > Options: > > > IOW: QCocoaIntegration::QCocoaIntegration() is called with an empty > paramList (or --fontengine is not accepted into that list), and whoever > else does the fallback option parsing doesn't support --fontengine either. To get parameters passed to QCocoaIntegration::QCocoaIntegration(), you should use -platform cocoa:fontengine=freetype, which I haven't tried, but similar works for me on Windows. Also double check your Qt was built with FreeType support. Regards, -- Sérgio Martins | sergio.mart...@kdab.com | Software Engineer Klarälvdalens Datakonsult AB, a KDAB Group company Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322) KDAB - The Qt Experts ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?
Sergio Martins wrote: > -platform cocoa:fontengine=freetype Ahh, right, thanks! I was already quite certain that Freetype support was built in (it appears to be the default). I can now confirm that Freetype works, even the Infinality patches (bohoomil's fontconfig ultimate variant). I'm not certain though if those make any sense without also using fontconfig . R. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?
Sergio Martins wrote: > I don't think so, see QCocoaIntegration::fontDatabase(), it returns > QCoreTextFontDatabase inconditionally. > > Doesn't seem like much work to support fontconfig though. And it could make sense if the goal is indeed to provide identical font rendering across platforms, even more if the goal (of certain applications I've seen cited in this context) is to get the best possible rendering quality. I don't have any direct experience using the fontconfig API, so I won't be playing with this myself anytime soon I fear. R. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?
On Saturday, March 19, 2016 12:50:26 PM René J.V. Bertin wrote: > What about fontconfig, is that library used on OS X when Qt is configured > with -fontconfig? I don't think so, see QCocoaIntegration::fontDatabase(), it returns QCoreTextFontDatabase inconditionally. Doesn't seem like much work to support fontconfig though. Regards, -- Sérgio Martins | sergio.mart...@kdab.com | Software Engineer Klarälvdalens Datakonsult AB, a KDAB Group company Tel: Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322) KDAB - The Qt Experts ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?
On Friday March 18 2016 14:15:32 Sergio Martins wrote: >Where was --fontengine=freetype planed, or where did you see it would work ? My bad, given the lack of information I had no previous knowledge to infer the argument sequence that does work. >To get parameters passed to QCocoaIntegration::QCocoaIntegration(), you should >use -platform cocoa:fontengine=freetype, which I haven't tried, but similar >works for me on Windows. Indeed that works. What about fontconfig, is that library used on OS X when Qt is configured with -fontconfig? R. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?
Till Oliver Knoll wrote: > According to > > https://wiki.qt.io/New_Features_in_Qt_5.6 > > "Optional support for using FreeType on Mac OS X" is now available. Yeah, but apparently not exactly as planned: %> Assistant.app/Contents/MacOS/Assistant --fontengine=freetype QCocoaIntegration::Options parseOptions(const QStringList &) paramList= () Unknown option: --fontengine=freetype Usage: assistant [Options] %> Qt\ Creator.app/Contents/MacOS/Qt\ Creator --fontengine=freetype QCocoaIntegration::Options parseOptions(const QStringList &) paramList= () Unknown option --fontengine=freetype Usage: Qt Creator [OPTION]... [FILE]... Options: IOW: QCocoaIntegration::QCocoaIntegration() is called with an empty paramList (or --fontengine is not accepted into that list), and whoever else does the fallback option parsing doesn't support --fontengine either. R. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development