Results 1 to 3 of 3

Thread: Fast Font Rendering

  1. #1
    Join Date
    Feb 2010
    Posts
    20
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Fast Font Rendering

    I have an app where I need to write text over images. I'm going to be doing this with a fixed font type and size.

    I was wondering is there a way to "cache" the rendered fonts so that each character does not have to be completely re-rendered every time?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Fast Font Rendering

    Take a look at the image composition example under Painting in Assistant. Then you just need to get the characters into an image. Or you could look at QPicture to capture the rendered text.

    If you will be pasting a series of characters together you need to be aware that spacing is typically not regular and does overlap. It really is easier for Qt to look after this for you.

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Fast Font Rendering

    You must be saving text to be drawn somewhere. When capturing/ drawing text is finished, just draw the text over the image. QImage is a paint device, and you can always draw over a paint device, cant you

Similar Threads

  1. Replies: 8
    Last Post: 7th November 2012, 19:20
  2. Font rendering on Mac
    By menab0t in forum Qt Programming
    Replies: 0
    Last Post: 19th May 2009, 12:21
  3. Change Font of QListWidget to Monospace Font
    By pospiech in forum Qt Programming
    Replies: 3
    Last Post: 25th July 2008, 18:23
  4. font incorrectly show - font break.
    By sgh in forum Qt Programming
    Replies: 9
    Last Post: 30th May 2008, 02:35
  5. Replies: 1
    Last Post: 25th December 2007, 10:35

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.