Freetype font rendering on Windows?
-
wrote on 23 Nov 2010, 20:17 last edited by
Can Qt be built with Freetype support on Windows?
There's subfolder in the bundled Freetype source that at least points in that direction:
qt-source/src/3rdparty/freetype/builds/win32Thank you!
-
wrote on 23 Nov 2010, 20:53 last edited by
Features can be switchen on by configure. But freetype can only be switched on for Symbian or Qt Embedded. So I'm afraid, freetype can't be switchen on for windows directly. You can try to call configure and then modify the pro / makefiles to inckude it, but I think, it is not tested...
-
wrote on 24 Nov 2010, 14:37 last edited by
[quote author="Gerolf Reinwardt" date="1290545596"]But freetype can only be switched on for Symbian or Qt Embedded.[/quote]
Yes, that's what I had figured out, too.I'd love to hear a concluding statement by the Qt devs...
-
wrote on 1 Feb 2011, 17:47 last edited by
[quote author="peglegrot" date="1290609442"]I'd love to hear a concluding statement by the Qt devs...[/quote]
Me too. No feedback yet ?
-
wrote on 3 Nov 2014, 15:47 last edited by
With Qt5, pass:
-platform windows:fontengine=freetypeto your app
-
wrote on 18 Nov 2014, 01:38 last edited by
Qt5 == yes
Qt4 == no.. but read on==============
I've just finished patching the 4.8.6 source to support Freetype on Windows (including Windows CE). It seems to be working well, but has not been reviewed.
-
wrote on 18 Nov 2014, 07:57 last edited by
[quote author="culyun" date="1416274707"]Qt5 == yes
Qt4 == no.. but read on==============
I've just finished patching the 4.8.6 source to support Freetype on Windows (including Windows CE). It seems to be working well, but has not been reviewed.[/quote]
Got a link ?
-
wrote on 18 Nov 2014, 20:33 last edited by
Too soon. it's just popped out of the oven so to say. That said, I can provide a patch file for 4.8.6. Give me a week or two and I'll publish the patch.
I'm going to commit the changes to Gerrit for the devs to mull over.
I'm going to upload to gerrit
[quote author="iamsergio" date="1416297451"]
[quote author="culyun" date="1416274707"]Qt5 == yes
Qt4 == no.. but read on==============
I've just finished patching the 4.8.6 source to support Freetype on Windows (including Windows CE). It seems to be working well, but has not been reviewed.[/quote]
Got a link ?
[/quote]
-
wrote on 20 Nov 2014, 23:54 last edited by
How can i programmatically select the freetype engine on startup?
On the windows platform we have a (ttf) font looks good with a Qml App and ugly on a Widget App when not using the command line option to use the freetype font engine. This is still unclear to me.Regards.
-
wrote on 20 Nov 2014, 23:54 last edited by
How can i programmatically select the freetype engine on startup?
On the windows platform we have a (ttf) font looks good with a Qml App and ugly on a Widget App when not using the command line option to use the freetype font engine. This is still unclear to me.Regards.
-
wrote on 21 Nov 2014, 01:37 last edited by
I don't think you can specify at runtime, but it is an interesting idea...
But if you're willing to build Qt5 for yourself (not too hard) you can configure the build so that Freetype is used internally by Qt on Windows (widget apps).
[quote author="lunatic fringe" date="1416527650"]How can i programmatically select the freetype engine on startup?
On the windows platform we have a (ttf) font looks good with a Qml App and ugly on a Widget App when not using the command line option to use the freetype font engine. This is still unclear to me.Regards.[/quote]
-
wrote on 21 Nov 2014, 01:37 last edited by
I don't think you can specify at runtime, but it is an interesting idea...
But if you're willing to build Qt5 for yourself (not too hard) you can configure the build so that Freetype is used internally by Qt on Windows (widget apps).
[quote author="lunatic fringe" date="1416527650"]How can i programmatically select the freetype engine on startup?
On the windows platform we have a (ttf) font looks good with a Qml App and ugly on a Widget App when not using the command line option to use the freetype font engine. This is still unclear to me.Regards.[/quote]
-
wrote on 21 Nov 2014, 23:21 last edited by
At least you can manipulate the arguments for QApplication ...
But i have still difficulties using fonts under windows whether i use the freetype font engine or not.
We need to use a Bosch font, which looks like
qml app : !http://burningrain.no-ip.info/images/font_in_qml.png(qml app)!
widget app: !http://burningrain.no-ip.info/images/font_in_widget.png(widget app)!Does anyone knows how to improove the presentation of the font in the qt app ?
-
wrote on 21 Nov 2014, 23:21 last edited by
At least you can manipulate the arguments for QApplication ...
But i have still difficulties using fonts under windows whether i use the freetype font engine or not.
We need to use a Bosch font, which looks like
qml app : !http://burningrain.no-ip.info/images/font_in_qml.png(qml app)!
widget app: !http://burningrain.no-ip.info/images/font_in_widget.png(widget app)!Does anyone knows how to improove the presentation of the font in the qt app ?
-
wrote on 3 Dec 2014, 22:45 last edited by
I think all you need is a simple mod to the Qt 5 source.
In
.\qtbase\src\plugins\platforms\windows\qwindowsfontdatabase_ft.cpp
Goto addFontToDatabase
and modify the line that reads
const bool antialias = false;
to
const bool antialias = true;
Rebuild Qt, and voila anti-aliasing on Windows.
[quote author="lunatic fringe" date="1416612075"]At least you can manipulate the arguments for QApplication ...
But i have still difficulties using fonts under windows whether i use the freetype font engine or not.
We need to use a Bosch font, which looks like
qml app : !http://burningrain.no-ip.info/images/font_in_qml.png(qml app)!
widget app: !http://burningrain.no-ip.info/images/font_in_widget.png(widget app)!Does anyone knows how to improove the presentation of the font in the qt app ?[/quote]
-
wrote on 3 Dec 2014, 22:45 last edited by
I think all you need is a simple mod to the Qt 5 source.
In
.\qtbase\src\plugins\platforms\windows\qwindowsfontdatabase_ft.cpp
Goto addFontToDatabase
and modify the line that reads
const bool antialias = false;
to
const bool antialias = true;
Rebuild Qt, and voila anti-aliasing on Windows.
[quote author="lunatic fringe" date="1416612075"]At least you can manipulate the arguments for QApplication ...
But i have still difficulties using fonts under windows whether i use the freetype font engine or not.
We need to use a Bosch font, which looks like
qml app : !http://burningrain.no-ip.info/images/font_in_qml.png(qml app)!
widget app: !http://burningrain.no-ip.info/images/font_in_widget.png(widget app)!Does anyone knows how to improove the presentation of the font in the qt app ?[/quote]
-
wrote on 5 Dec 2014, 10:57 last edited by
thanks for the tip, but this does not help :-(
I tried what's been pointed to in that "thead":http://www.qtcentre.org/archive/index.php/t-57280.html with succes but this is currently for me not the way to go
-
wrote on 5 Dec 2014, 10:57 last edited by
thanks for the tip, but this does not help :-(
I tried what's been pointed to in that "thead":http://www.qtcentre.org/archive/index.php/t-57280.html with succes but this is currently for me not the way to go
-
wrote on 29 Jan 2015, 03:42 last edited by
My application works with Freetype on windows. I compiled Qt source 5.3. but i don't use freetype included in qt source. I download freetype2.5.3 and compile it as DLL using VS.
The step is following.
-
Compile qtbase source using -system-freetype
configure.bat ..... -system-freetype -
change platformsupport/basic/basic.pri
} else:contains(QT_CONFIG, system-freetype) {
# pull in the proper freetype2 include directory
# include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)#here is your compiled freetype INCLUDEPATH +=C:/projects/freetype-2.5.3/include LIBS += -LC:/projects/freetype-2.5.3/lib/x64 -lfreetyped -lfreetype
}
3. if necessary, add following into gui/text/text.pri
INCLUDEPATH +=C:/projects/freetype-2.5.3/include
LIBS += -LC:/projects/freetype-2.5.3/lib/x64 -lfreetyped -lfreetype-
build your qbase
-
enable your application work with freetype
copy your built qt related dll into your application bin dir
copy freetype dll into your application bin dir
create file named qt.conf , append a line[Platforms]
WindowsArguments = fontengine=freetype
and save qt.conf into your application bin dir
that's all it should work for you.
-
-
wrote on 29 Jan 2015, 03:42 last edited by
My application works with Freetype on windows. I compiled Qt source 5.3. but i don't use freetype included in qt source. I download freetype2.5.3 and compile it as DLL using VS.
The step is following.
-
Compile qtbase source using -system-freetype
configure.bat ..... -system-freetype -
change platformsupport/basic/basic.pri
} else:contains(QT_CONFIG, system-freetype) {
# pull in the proper freetype2 include directory
# include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)#here is your compiled freetype INCLUDEPATH +=C:/projects/freetype-2.5.3/include LIBS += -LC:/projects/freetype-2.5.3/lib/x64 -lfreetyped -lfreetype
}
3. if necessary, add following into gui/text/text.pri
INCLUDEPATH +=C:/projects/freetype-2.5.3/include
LIBS += -LC:/projects/freetype-2.5.3/lib/x64 -lfreetyped -lfreetype-
build your qbase
-
enable your application work with freetype
copy your built qt related dll into your application bin dir
copy freetype dll into your application bin dir
create file named qt.conf , append a line[Platforms]
WindowsArguments = fontengine=freetype
and save qt.conf into your application bin dir
that's all it should work for you.
-