PDA

View Full Version : How to using/setting the font caching



iceman
26th July 2010, 09:34
Hi guys
I am writing an application and now I need to know how to use the 'font caching' functionality.
does it be able to work internally & automatically?
or is there any APIs to set font caching mode?

aamer4yu
26th July 2010, 10:49
How would you define 'font caching' ??

iceman
26th July 2010, 12:00
Font Caching that i thought was caching the font information such as glyph.
I think qt font might be the free type font internally. and that kind of information can make font processing faster.

aamer4yu
26th July 2010, 13:18
Ok..
Qt doesnt do caching till now as far as I know.
This feature will be available from Qt 4.7 onwards.

Have a look at QStaticText (http://doc.trolltech.com/4.7-snapshot/qstatictext.html)
I guess thats what you were looking for :rolleyes:

iceman
28th July 2010, 03:39
On my closer examination, much of the part in the QFontCache and the QFontEngineData seems to be related to Font Caching.
(C:\Qt\2010.04\qt\src\gui\text\qfont_p.h)

But I can't catch how to use them to support Font Cashing because there's no examples for information about using the Font Caching and there's no API Reference for them.

does the Font Caching be able to work internally & automatically when i use QFont?

thank you.

aamer4yu
28th July 2010, 05:35
does the Font Caching be able to work internally & automatically when i use QFont?
I guess yes.
bec qfont_p.h is private header and those classes are internally used by Qt. The user is not supposed to be bothered about them.