[Qt-qml] FontLoader memory consumption
aaron.kennedy at nokia.com
aaron.kennedy at nokia.com
Fri Oct 22 12:23:03 CEST 2010
Hi,
It is possible that this is happening. Can you please file a bug?
In the mean time, it is possible to work around this just by putting your FontLoader in the root of your qml project instead of one in each PrimaryText element.
Cheers,
Aaron
On 22/10/2010, at 7:44 PM, ext Cornelius Hald wrote:
> 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 at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
More information about the Qt-qml
mailing list