×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    41

    Custom Font loading from CFont/AknFontAccess Symbian C++ -> QFont/QFontDatabase in Qt

    Hello!

    As you can notice very quickly, you will fail to load font files (*.ttf) by using
    Code:
    QFontDatabase
    (...fromData, or read from file directly) in Qt 4.6.2.

    I found this: http://wiki.forum.nokia.com/index.ph...c_custom_fonts

    And I could load the ttf file until I get the
    Code:
    CFont
    .

    My question is: how to use
    Code:
    CFont
    in Qt application?

    Thanks

    Dio

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Custom Font loading from CFont/AknFontAccess Symbian C++ -> QFont/QFontDatabase i

    http://bugreports.qt.nokia.com/browse/QTBUG-6611
    Read that - it discusses all the relevant issues for using custom fonts in Qt apps on Symbian. You can do it now but there isn't an elegant solution without any problems. There are workarounds you can do to avoid the problems with current solutions. You can copy the font file somewhere public in your app and then leave it behind when the app is uninstalled to prevent possible uninstall problems with some other app using your font (as discussed in the bug report)! This is messy but should work.

    Mark

  3. #3
    Registered User
    Join Date
    Dec 2010
    Posts
    41

    Re: Custom Font loading from CFont/AknFontAccess Symbian C++ -> QFont/QFontDatabase i

    Do you mean bay loading the *.ttf using QFontDatabase?

  4. #4
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Custom Font loading from CFont/AknFontAccess Symbian C++ -> QFont/QFontDatabase i

    The bug report is about the fact that you can't use the QFontDatabase API on Symbian at the moment and they are fixing it! You can either wait for the fix or copy the solution they are using locally in your project (using CWsScreenDevice::AddFile() and the various workarounds discussed in the bug comments).

Similar Threads

  1. Loading custom font (ttf) in Symbian^3
    By ivanlitovski in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2010-12-27, 07:15
  2. CFont and height of font
    By vinayakak in forum Symbian
    Replies: 9
    Last Post: 2008-12-17, 11:24
  3. Replies: 0
    Last Post: 2005-12-23, 22:14

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •