summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_s60_p.h
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@nokia.com>2010-05-31 00:51:05 +0200
committerAlessandro Portale <alessandro.portale@nokia.com>2010-06-03 16:52:57 +0200
commit7d71e65658d27c200f97b93781c3c7f7c313ff56 (patch)
tree2c6937d5db1c67bb64d414c1f38108313b483793 /src/gui/text/qfontengine_s60_p.h
parentf535efb015314fb07573739fd33aa00ba5502bde (diff)
Using Symbian's future font table getter Api
Qt requires raw access to the font tables of used fonts, for a variety of reasons. Until Symbian^4, it is/was not possible to access the font tables of the fonts which are stored in Symbians Font and Bitmap Server. That's why Qt for Symbian's FontDataBase created an own TFontStore where it loaded in all installed fonts. While accessing the font tables via the own TFontStore it still uses the rasterization and metrics from the FBS, which has public Api for those things. However, loading all fonts in the own TFontStore for each Qt Gui process slows down the program startup. Symbian's future font table setter Api is very welcome and this implemets it's usage. This patch lets Qt use the new font API on Symbain^4. The font tables are retrieved via RFontTable. Task-number: QT-2746 Reviewed-by: Jason Barron
Diffstat (limited to 'src/gui/text/qfontengine_s60_p.h')
-rw-r--r--src/gui/text/qfontengine_s60_p.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h
index 6883730e99..dea32c489f 100644
--- a/src/gui/text/qfontengine_s60_p.h
+++ b/src/gui/text/qfontengine_s60_p.h
@@ -58,6 +58,10 @@
#include "qsize.h"
#include <openfont.h>
+#ifdef SYMBIAN_GDI_GLYPHDATA
+#define Q_SYMBIAN_HAS_FONTTABLE_API
+#endif
+
class CFont;
QT_BEGIN_NAMESPACE
@@ -66,20 +70,22 @@ QT_BEGIN_NAMESPACE
class QSymbianTypeFaceExtras
{
public:
- QSymbianTypeFaceExtras(CFont* fontOwner, COpenFont *font);
+ QSymbianTypeFaceExtras(CFont* cFont, COpenFont *openFont = 0);
+ ~QSymbianTypeFaceExtras();
QByteArray getSfntTable(uint tag) const;
bool getSfntTableData(uint tag, uchar *buffer, uint *length) const;
- const unsigned char *cmap() const;
+ const uchar *cmap() const;
CFont *fontOwner() const;
private:
- COpenFont *m_font;
- mutable MOpenFontTrueTypeExtension *m_trueTypeExtension;
- mutable const unsigned char *m_cmap;
+ CFont* m_cFont;
mutable bool m_symbolCMap;
mutable QByteArray m_cmapTable;
- CFont* m_fontOwner;
+#ifndef Q_SYMBIAN_HAS_FONTTABLE_API
+ COpenFont *m_openFont;
+ mutable MOpenFontTrueTypeExtension *m_trueTypeExtension;
+#endif // Q_SYMBIAN_HAS_FONTTABLE_API
};
class QFontEngineS60 : public QFontEngine