src/gui/text/qfontengine_s60_p.h
changeset 7 f7bc934e204c
parent 3 41300fa6a67c
child 22 79de32ba3296
equal deleted inserted replaced
3:41300fa6a67c 7:f7bc934e204c
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
    56 #include "qconfig.h"
    56 #include "qconfig.h"
    57 #include "qfontengine_p.h"
    57 #include "qfontengine_p.h"
    58 #include "qsize.h"
    58 #include "qsize.h"
    59 #include <openfont.h>
    59 #include <openfont.h>
    60 
    60 
    61 class CFbsBitmap;
       
    62 class CFbsBitmapDevice;
       
    63 class CFbsBitGc;
       
    64 class CFont;
    61 class CFont;
    65 
    62 
    66 QT_BEGIN_NAMESPACE
    63 QT_BEGIN_NAMESPACE
    67 
    64 
    68 // ..gives us access to truetype tables, UTF-16<->GlyphID mapping, and glyph outlines
    65 // ..gives us access to truetype tables, UTF-16<->GlyphID mapping, and glyph outlines
   118     bool canRender(const QChar *string, int len);
   115     bool canRender(const QChar *string, int len);
   119 
   116 
   120     Type type() const;
   117     Type type() const;
   121 
   118 
   122     void getCharacterData(glyph_t glyph, TOpenFontCharMetrics& metrics, const TUint8*& bitmap, TSize& bitmapSize) const;
   119     void getCharacterData(glyph_t glyph, TOpenFontCharMetrics& metrics, const TUint8*& bitmap, TSize& bitmapSize) const;
       
   120     void setFontScale(qreal scale);
   123 
   121 
   124 private:
   122 private:
   125     friend class QFontPrivate;
   123     friend class QFontPrivate;
   126 
   124 
   127     QFixed glyphAdvance(HB_Glyph glyph) const;
   125     QFixed glyphAdvance(HB_Glyph glyph) const;
       
   126     CFont *fontWithSize(qreal size) const;
       
   127     static void releaseFont(CFont *&font);
   128 
   128 
   129     CFbsBitmap *m_textRenderBitmap;
       
   130     CFbsBitmapDevice *m_textRenderBitmapDevice;
       
   131     CFbsBitGc *m_textRenderBitmapGc;
       
   132     CFont* m_font;
       
   133     const QFontEngineS60Extensions *m_extensions;
   129     const QFontEngineS60Extensions *m_extensions;
   134     qreal m_fontSizeInPixels;
   130     CFont* m_originalFont;
       
   131     const qreal m_originalFontSizeInPixels;
       
   132     CFont* m_scaledFont;
       
   133     qreal m_scaledFontSizeInPixels;
       
   134     CFont* m_activeFont;
   135 };
   135 };
   136 
   136 
   137 class QFontEngineMultiS60 : public QFontEngineMulti
   137 class QFontEngineMultiS60 : public QFontEngineMulti
   138 {
   138 {
   139 public:
   139 public: