[Development] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?

René J.V. Bertin rjvbertin at gmail.com
Tue Mar 22 12:13:30 CET 2016

On Tuesday March 22 2016 00:30:11 Allan Sandfeld Jensen wrote:

> I would suggest trying to change QCocoaIntegration::styleHint
> and return 1.0 for QPlatformIntegration::FontSmoothingGamma instead of 2.0.

You'd have to return

mOptions.testFlag(UseFreeTypeFontEngine)? 1.0 : 2.0

for that stylehint because otherwise text rendering becomes really bad using CoreText. Some quick testing suggests that QPlatformIntegration::FontSmoothingGamma is queried only once, is that correct (typically)?

Anyway, using a gamma of 1 gives this result, again CoreText vs. Freetype vs. FreeType+FontConfig using XCB in the 1st snap, CoreText vs. Freetype in the 2nd using the native Mac theme/style. That looks almost perfectly usable, making one wonder if there's a way to activate the Freetype engine through some form of global option, possibly programmatically?

The rendering difference in Lucida Grande between CoreText and Freetype is surprising but corresponds to what I'm used to (sadly it makes UI text look even larger when set at 13pt).

Font purists may notice the slightly wide stem of the F in the Cocoa/Freetype rendering of Novarese BQ in the 1st snap, compared to the XCB/Freetype+Fontconfig rendering. That is *probably* a result of the lack of use of Fontconfig under Cocoa.

Are there plans to add Fontconfig support?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CoreText-vs-Freetype-Gamma1.png
Type: image/png
Size: 77659 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160322/41fec17f/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CoreText-vs-Freetype-Gamma1-native.png
Type: image/png
Size: 73686 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160322/41fec17f/attachment-0001.png>

More information about the Development mailing list