Results 1 to 6 of 6

Thread: How to register a font with Qt?

  1. #1
    Join Date
    Sep 2008
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to register a font with Qt?

    Hi,

    I'd like to ship a font with my program. How can I register it with Qt so it's able to find it?

  2. #2
    Join Date
    Sep 2008
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to register a font with Qt?

    I suspect what I'm looking at is registering the font on every platform individually... but I'm not able to find any information about this.

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to register a font with Qt?

    See QFontDatabase (static public members).
    J-P Nurmi

  4. The following 2 users say thank you to jpn for this useful post:

    nightghost (29th January 2009), Vadi (1st February 2009)

  5. #4
    Join Date
    Sep 2008
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to register a font with Qt?

    Thanks a bunch, I missed a function there.

  6. #5
    Join Date
    Sep 2008
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to register a font with Qt?

    Another small thing - what is the best way to check if a font is installed? I think it would be better to check if the system already has it and only then use mine.

    Is quering QFontDatabase::families and then searching inside the list ok?

  7. #6
    Join Date
    Sep 2008
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to register a font with Qt?

    Nevermind, it's all good. Thanks for your tip!

Similar Threads

  1. font can not be changed
    By ashishsaryar in forum Qt Programming
    Replies: 4
    Last Post: 28th May 2008, 15:32
  2. Font size calculation when painting in a QImage
    By Ishark in forum Qt Programming
    Replies: 3
    Last Post: 15th July 2007, 22:22
  3. Automatic font selection
    By NTwoO in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 27th April 2007, 12:40
  4. Font not Antialiasing
    By ChasW in forum Qt Programming
    Replies: 6
    Last Post: 21st January 2007, 18:12
  5. Qt renders wrong font
    By durbrak in forum Qt Programming
    Replies: 8
    Last Post: 2nd November 2006, 14:36

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.