Hi Juha,

On Wed, 2010-12-08 at 13:52 +0200, Juha Turunen wrote:
> I think the Symbian Qt port is just lacking functionality in this
> department (don't know about Maemo).

I just tried again on Maemo and the font is loaded correctly. So the
problem really only seems to be Symbian.

> You need to tell the Symbian FBS (font and bitmap server) that it
> should add your font to the typeface store. You can do that with this
> bit of code:
> 
>     TInt id;
>     CEikonEnv::Static()->ScreenDevice()->AddFile(_L("<path to your
> font file>"), id);

Looks a bit scary to a Symbian noob like me :) Also I then can't load
the font from the resource file anymore. Still, if this part is missing
in Qt, it seems to be a reasonable way.

> You don't have to explicitly add the font file, if you deploy to
> \resource\fonts\ (you still need to refresh the store or reboot after
> installation though), but I would advise against that, because it
> complicates uninstalling and updating (the font file will be locked
> after boot and you'll need to provide a small exe in your .sis file to
> unload the font).
> 
> You can clean up after yourself using RemoveFile() if your app is
> somewhat rarely used and you want to free up the resources.
> 
> After adding the font file to the typeface store you can use the font
> in your QML elements just by referring to it in font.family property.

Thanks a lot for all this information. I'll give it a try as soon as
possible. BTW, do you know if there is a bug report about this already?
If not I think I should file one.

Cheers,
Conny


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

Reply via email to