[Interest] animation on font.pixelSize

Jason H scorp1us at yahoo.com
Fri Jan 11 19:21:11 CET 2013


Try scale, not pixelSize.
http://blog.qt.digia.com/blog/2011/07/15/text-rendering-in-the-qml-scene-graph/
"scalable, sub-pixel positioned and sub-pixel antialiased… and at almost no cost."



________________________________
 From: Thomas Senyk <thomas.senyk at pelagicore.com>
To: interest at qt-project.org 
Sent: Friday, January 11, 2013 10:59 AM
Subject: [Interest] animation on font.pixelSize
 
Hi,

as with Quick2.0 we got the very nice DistanceField-font-rendering.
So in theory animations on Text{ font.pixelSize } should be fairly cheap, 
right?

With the following code snipped I got performance problems never the less:

import QtQuick 2.0
Text {
    id: text
    width: 500
    height: 100
    text: "Test font.pixelSize animation"
    NumberAnimation {
        running: true
        loops: Animation.Infinite
        duration: 2000
        target: text
        property: "font.pixelSize"
        from: 10
        to: 90
    }
}


The strange thing is, on my desktop he has 100% cpu load for the first 2-4 
loops. 
... I wild guess: It looks like it needs to render the font-glyphs for each(?) 
size and after a few cycles it got all of them rendered and cached...?
(it can't render all of them in the first loop as he jumps due to bad 
performance)

On embedded (raspberry pi) I get <20% load all the time.

On desktop I got:
- intel xeon 3ghz
- nvidia 8600gts
- Qt5 checkout from this week, branch: stable 
- xcb as platform backend (using freetype and fontconfig)

On the raspberry  I got:
  - BCM 2835 (slow ARM11 cpu, fast VideoCore IV GPU)
  - eglfs as platform backend
  - no fontconfig -> QBasicFontDatabase
(If it helps I can do a fontconfig build)

Is this know? Can anyone verify?
And possible explanation? .. maybe my Qt5 build on desktop is flawed?


(If this belongs to development at qt-project.org, feel free to move)

Greets
Thomas
_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130111/ebddd3e1/attachment.html>


More information about the Interest mailing list