equal
deleted
inserted
replaced
178 QGlyphSet(); |
178 QGlyphSet(); |
179 ~QGlyphSet(); |
179 ~QGlyphSet(); |
180 FT_Matrix transformationMatrix; |
180 FT_Matrix transformationMatrix; |
181 unsigned long id; // server sided id, GlyphSet for X11 |
181 unsigned long id; // server sided id, GlyphSet for X11 |
182 bool outline_drawing; |
182 bool outline_drawing; |
|
183 |
|
184 void removeGlyphFromCache(int index); |
|
185 void clear(); |
|
186 inline Glyph *getGlyph(int index) const |
|
187 { |
|
188 if (index < 256) |
|
189 return fast_glyph_data[index]; |
|
190 return glyph_data.value(index); |
|
191 } |
|
192 void setGlyph(int index, Glyph *glyph); |
|
193 |
|
194 private: |
183 mutable QHash<int, Glyph *> glyph_data; // maps from glyph index to glyph data |
195 mutable QHash<int, Glyph *> glyph_data; // maps from glyph index to glyph data |
|
196 mutable Glyph *fast_glyph_data[256]; // for fast lookup of glyphs < 256 |
|
197 mutable int fast_glyph_count; |
184 }; |
198 }; |
185 |
199 |
186 virtual QFontEngine::FaceId faceId() const; |
200 virtual QFontEngine::FaceId faceId() const; |
187 virtual QFontEngine::Properties properties() const; |
201 virtual QFontEngine::Properties properties() const; |
188 virtual QFixed emSquareSize() const; |
202 virtual QFixed emSquareSize() const; |
250 Glyph *loadGlyph(QGlyphSet *set, uint glyph, GlyphFormat = Format_None, bool fetchMetricsOnly = false) const; |
264 Glyph *loadGlyph(QGlyphSet *set, uint glyph, GlyphFormat = Format_None, bool fetchMetricsOnly = false) const; |
251 |
265 |
252 QGlyphSet *defaultGlyphs() { return &defaultGlyphSet; } |
266 QGlyphSet *defaultGlyphs() { return &defaultGlyphSet; } |
253 GlyphFormat defaultGlyphFormat() const { return defaultFormat; } |
267 GlyphFormat defaultGlyphFormat() const { return defaultFormat; } |
254 |
268 |
255 inline Glyph *cachedGlyph(glyph_t g) const { return defaultGlyphSet.glyph_data.value(g); } |
269 inline Glyph *cachedGlyph(glyph_t g) const { return defaultGlyphSet.getGlyph(g); } |
256 |
270 |
257 QGlyphSet *loadTransformedGlyphSet(const QTransform &matrix); |
271 QGlyphSet *loadTransformedGlyphSet(const QTransform &matrix); |
258 bool loadGlyphs(QGlyphSet *gs, glyph_t *glyphs, int num_glyphs, GlyphFormat format = Format_Render); |
272 bool loadGlyphs(QGlyphSet *gs, glyph_t *glyphs, int num_glyphs, GlyphFormat format = Format_Render); |
259 |
273 |
260 #if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) |
274 #if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) |