Hi,

I want to include custom fonts within my QML application. Currently I'm
doing it like this:

# PrimaryText.qml
Text {
    FontLoader { id: myfont; source: "../fonts/myfont.ttf"}
    font.family: myfont.name
    font.pixelSize: 26
}

Everywhere I need this font, I'm using 'PrimaryText' instead of 'Text'.

The problem with this approach seems to be that the font is loaded into
memory for each use of the 'PrimaryText' component.

Is this my design? Is there a better way to solve this use-case?

Thanks!
Conny


_______________________________________________
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml

Reply via email to