[Qt-qml] FontLoader memory consumption

yann.bodson at nokia.com yann.bodson at nokia.com
Mon Oct 25 02:03:52 CEST 2010


Hi Cornelius,

Just letting you know that I have closed this bug as it was already fixed in our development branch.
The fix will be in 4.7.1 but until then you will have to use Aaron's workaround.

Cheers,

- Yann

On 22/10/2010, at 8:57 PM, ext Cornelius Hald wrote:

> Hi Aaron,
> 
> thanks for the reply. The bug is filed here:
> http://bugreports.qt.nokia.com/browse/QTBUG-14629
> 
> Cheers,
> Conny
> 
> On Fri, 2010-10-22 at 10:23 +0000, aaron.kennedy at nokia.com wrote:
>> 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
>> 
> 
> 
> _______________________________________________
> 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