On 10 Nov 2014, at 08:30, Harri Pasanen <ha...@mpaja.com> wrote:

> Hi,
> 
> I've been playing with the font support in Qt.
> In C++ I'm able to define and select a custom application font with 
> font.setFamily("MyCoolFont"),
> but on the QML side something like
> 
> Text {
>     anchors.centerIn: parent
>     text: "Test font"
>     font.family: "MyCoolFont"
> }
> 
> seemingly does nothing.
> 
> Am I missing something, or is this just not implemented yet?

Yes it should work, as long as that’s an OS installed font.  If it isn’t 
installed, then you might want to use a FontLoader:

http://qt-project.org/doc/qt-5/qml-qtquick-fontloader.html

But if it works in C++ but not in QML, there might be a bug, so tell us more 
about what system you are using, and how and where the font is installed.

You can also try qtdeclarative/examples/quick/text/fonts/availableFonts.qml to 
see samples of all installed fonts, and see if the one you want is in the list.
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to