41 #ifndef QFONTENGINE_FT_P_H 42 #define QFONTENGINE_FT_P_H 56 #ifndef QT_NO_FREETYPE 59 #include FT_FREETYPE_H 62 #include <private/qt_x11_p.h> 67 #ifndef QT_NO_FONTCONFIG 68 #include <fontconfig/fontconfig.h> 73 #include <harfbuzz-shaper.h> 105 #ifndef QT_NO_FONTCONFIG 119 HB_Error
getPointInOutline(HB_Glyph glyph,
int flags, hb_uint32 point, HB_Fixed *xpos, HB_Fixed *ypos, hb_uint32 *nPoints);
160 #if defined(Q_WS_X11) && !defined(QT_NO_XRENDER) 164 unsigned short width;
165 unsigned short height;
197 return (index < 256 && subPixelPosition == 0);
204 mutable Glyph *fast_glyph_data[256];
210 virtual QFixed emSquareSize()
const;
213 return default_hint_style == HintLight ||
214 default_hint_style == HintNone;
217 virtual bool getSfntTableData(
uint tag,
uchar *buffer,
uint *length)
const;
218 virtual int synthesized()
const;
220 virtual QFixed ascent()
const;
221 virtual QFixed descent()
const;
222 virtual QFixed leading()
const;
223 virtual QFixed xHeight()
const;
224 virtual QFixed averageCharWidth()
const;
226 virtual qreal maxCharWidth()
const;
227 virtual qreal minLeftBearing()
const;
228 virtual qreal minRightBearing()
const;
229 virtual QFixed lineThickness()
const;
230 virtual QFixed underlinePosition()
const;
232 void doKerning(
QGlyphLayout *, QTextEngine::ShaperFlags)
const;
236 inline virtual const char *
name()
const 237 {
return "freetype"; }
241 virtual bool canRender(
const QChar *
string,
int len);
248 virtual bool stringToCMap(
const QChar *str,
int len,
QGlyphLayout *glyphs,
int *nglyphs,
249 QTextEngine::ShaperFlags flags)
const;
255 virtual void recalcAdvances(
QGlyphLayout *glyphs, QTextEngine::ShaperFlags flags)
const;
263 virtual void removeGlyphFromCache(
glyph_t glyph);
265 virtual int glyphCount()
const;
272 void unlockFace()
const;
274 FT_Face non_locked_face()
const;
278 inline bool isBitmapFont()
const {
return defaultFormat == Format_Mono; }
281 {
return loadGlyph(&defaultGlyphSet, glyph, subPixelPosition, format, fetchMetricsOnly); }
295 #if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) 307 virtual HB_Error
getPointInOutline(HB_Glyph glyph,
int flags, hb_uint32 point, HB_Fixed *xpos, HB_Fixed *ypos, hb_uint32 *nPoints);
316 void setDefaultHintStyle(
HintStyle style);
324 void freeGlyphSets();
326 virtual bool uploadGlyphToServer(
QGlyphSet *
set,
uint glyphid,
Glyph *g, GlyphInfo *
info,
int glyphDataSize)
const;
327 virtual unsigned long allocateServerGlyphSet();
328 virtual void freeServerGlyphSet(
unsigned long id);
376 if (useFastGlyphData(index, subPixelPosition))
377 return fast_glyph_data[
index];
384 #endif // QT_NO_FREETYPE 386 #endif // QFONTENGINE_FT_P_H QGlyphSet defaultGlyphSet
static QFreetypeFace * getFace(const QFontEngine::FaceId &face_id, const QByteArray &fontData=QByteArray())
HB_Error getPointInOutline(HB_Glyph glyph, int flags, hb_uint32 point, HB_Fixed *xpos, HB_Fixed *ypos, hb_uint32 *nPoints)
SubpixelAntialiasingType subpixelType
QList< QGlyphSet > transformedGlyphSets
virtual Type type() const
unsigned int uploadedToServer
virtual bool supportsSubPixelPositions() const
static mach_timebase_info_data_t info
#define QT_END_NAMESPACE
This macro expands to.
void lock()
Locks the mutex.
The QMutex class provides access serialization between threads.
uint qHash(const QFontEngineFT::GlyphAndSubPixelPosition &g)
The QAtomicInt class provides platform-independent atomic operations on integers. ...
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
GlyphFormat defaultGlyphFormat() const
friend class QFontEngineFT
The QByteArray class provides an array of bytes.
static void clear(QVariant::Private *d)
virtual QImage alphaMapForGlyph(glyph_t g)
GlyphFormat defaultFormat
bool getSfntTable(uint tag, uchar *buffer, uint *length) const
The QHash class is a template class that provides a hash-table-based dictionary.
The QChar class provides a 16-bit Unicode character.
Glyph * getGlyph(glyph_t index, QFixed subPixelPosition=0) const
HintStyle default_hint_style
static void addGlyphToPath(FT_Face face, FT_GlyphSlot g, const QFixedPoint &point, QPainterPath *path, FT_Fixed x_scale, FT_Fixed y_scale)
bool useFastGlyphData(glyph_t index, QFixed subPixelPosition) const
#define QT_BEGIN_NAMESPACE
This macro expands to.
FT_Matrix transformationMatrix
struct FT_FaceRec_ * FT_Face
static float pixelSize(const QFontDef &request, int dpi)
static const QCssKnownValue positions[NumKnownPositionModes - 1]
static void addBitmapToPath(FT_GlyphSlot slot, const QFixedPoint &point, QPainterPath *path, bool=false)
QGlyphSet * defaultGlyphs()
The QImage class provides a hardware-independent image representation that allows direct access to th...
bool isBitmapFont() const
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
void unlock()
Unlocks the mutex.
bool kerning_pairs_loaded
QFontEngine::Properties properties() const
virtual void draw(QPaintEngine *, qreal, qreal, const QTextItemInt &)
bool operator==(const GlyphAndSubPixelPosition &other) const
glyph_t cmapCache[cmapCacheSize]
QHash< GlyphAndSubPixelPosition, Glyph * > glyph_data
Glyph * cachedGlyph(glyph_t g) const
void release(const QFontEngine::FaceId &face_id)
bool canUploadGlyphsToServer
QFontEngine::FaceId face_id
QFixed underline_position
GlyphAndSubPixelPosition(glyph_t g, QFixed spp)
int loadFlags(QGlyphSet *set, GlyphFormat format, int flags, bool &hsubpixel, int &vfactor) const
HintStyle defaultHintStyle() const
virtual const char * name() const
void computeSize(const QFontDef &fontDef, int *xsize, int *ysize, bool *outline_drawing)
Glyph * loadGlyph(uint glyph, QFixed subPixelPosition, GlyphFormat format=Format_None, bool fetchMetricsOnly=false) const
bool drawAntialiased() const
The QList class is a template class that provides lists.