Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QFreetypeFace Class Reference

#include <qfontengine_ft_p.h>

+ Collaboration diagram for QFreetypeFace:

Public Types

enum  { cmapCacheSize = 0x200 }
 

Public Member Functions

void computeSize (const QFontDef &fontDef, int *xsize, int *ysize, bool *outline_drawing, QFixed *scalableBitmapScaleFactor)
 
QFontEngine::Properties properties () const
 
bool getSfntTable (uint tag, uchar *buffer, uint *length) const
 
void release (const QFontEngine::FaceId &face_id)
 
void lock ()
 
void unlock ()
 
int fsType () const
 
int getPointInOutline (glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints)
 
bool isScalableBitmap () const
 

Static Public Member Functions

static QFreetypeFacegetFace (const QFontEngine::FaceId &face_id, const QByteArray &fontData=QByteArray())
 
static int getFaceIndexByStyleName (const QString &faceFileName, const QString &styleName)
 
static void addGlyphToPath (FT_Face face, FT_GlyphSlot g, const QFixedPoint &point, QPainterPath *path, FT_Fixed x_scale, FT_Fixed y_scale)
 
static void addBitmapToPath (FT_GlyphSlot slot, const QFixedPoint &point, QPainterPath *path)
 

Public Attributes

FT_Face face
 
int xsize
 
int ysize
 
FT_Matrix matrix
 
FT_CharMap unicode_map
 
FT_CharMap symbol_map
 
glyph_t cmapCache [cmapCacheSize]
 

Friends

class QFontEngineFT
 
class QtFreetypeData
 

Detailed Description

Definition at line 41 of file qfontengine_ft_p.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
cmapCacheSize 

Definition at line 71 of file qfontengine_ft_p.h.

Member Function Documentation

◆ addBitmapToPath()

void QFreetypeFace::addBitmapToPath ( FT_GlyphSlot  slot,
const QFixedPoint point,
QPainterPath path 
)
static

Definition at line 579 of file qfontengine_ft.cpp.

References qt_addBitmapToPath(), QFixedPoint::toPointF(), TRUNC, QPointF::x(), and QPointF::y().

Referenced by QFontEngineFT::addOutlineToPath(), and QFontEngineFT::getUnscaledGlyph().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addGlyphToPath()

void QFreetypeFace::addGlyphToPath ( FT_Face  face,
FT_GlyphSlot  g,
const QFixedPoint point,
QPainterPath path,
FT_Fixed  x_scale,
FT_Fixed  y_scale 
)
static

Definition at line 485 of file qfontengine_ft.cpp.

References GLYPH2PATH_DEBUG, i, j, scaleOutline(), and QFixedPoint::toPointF().

Referenced by QFontEngineFT::addGlyphsToPath(), and QFontEngineFT::getUnscaledGlyph().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ computeSize()

void QFreetypeFace::computeSize ( const QFontDef fontDef,
int *  xsize,
int *  ysize,
bool *  outline_drawing,
QFixed scalableBitmapScaleFactor 
)

Definition at line 373 of file qfontengine_ft.cpp.

References QFixed::fromReal(), i, isScalableBitmap(), QFontDef::pixelSize, qAbs(), qRound(), QT_MAX_CACHED_GLYPH_SIZE, QFontDef::stretch, xsize, and ysize.

Referenced by QFontEngineFT::init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fsType()

int QFreetypeFace::fsType ( ) const

Definition at line 156 of file qfontengine_ft.cpp.

References fsType().

Referenced by fsType(), and QFontEngineFT::init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFace()

QFreetypeFace * QFreetypeFace::getFace ( const QFontEngine::FaceId face_id,
const QByteArray fontData = QByteArray() 
)
static

Definition at line 204 of file qfontengine_ft.cpp.

References QFile::decodeName(), face, QtFreetypeData::faces, file, QFontEngine::FaceId::filename, fileName, i, QFontEngine::FaceId::index, QHash< Key, T >::insert(), QByteArray::isEmpty(), QtFreetypeData::library, ok, QFile::open(), QT_CATCH, qt_fontdata_from_index(), qt_getFreetypeData(), QT_RETHROW, QT_TRY, QIODevice::readAll(), QIODeviceBase::ReadOnly, QBasicAtomicInteger< T >::ref(), release(), QByteArray::remove(), QByteArray::startsWith(), QByteArray::toInt(), and QHash< Key, T >::value().

Referenced by QFontEngineFT::init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFaceIndexByStyleName()

int QFreetypeFace::getFaceIndexByStyleName ( const QString faceFileName,
const QString styleName 
)
static

Definition at line 355 of file qfontengine_ft.cpp.

References computeFaceIndex(), QtFreetypeData::faceIndices, and qt_getFreetypeData().

Referenced by QCoreTextFontDatabaseEngineFactory< T >::fontEngine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPointInOutline()

int QFreetypeFace::getPointInOutline ( glyph_t  glyph,
int  flags,
quint32  point,
QFixed xpos,
QFixed ypos,
quint32 nPoints 
)

Definition at line 165 of file qfontengine_ft.cpp.

References Err_Invalid_SubTable, Err_Ok, error, and QFixed::fromFixed().

Referenced by QFontEngineFT::getPointInOutline().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSfntTable()

bool QFreetypeFace::getSfntTable ( uint  tag,
uchar buffer,
uint length 
) const

Definition at line 457 of file qfontengine_ft.cpp.

References ft_getSfntTable(), and tag.

+ Here is the call graph for this function:

◆ isScalableBitmap()

bool QFreetypeFace::isScalableBitmap ( ) const

Definition at line 186 of file qfontengine_ft.cpp.

Referenced by computeSize().

+ Here is the caller graph for this function:

◆ lock()

void QFreetypeFace::lock ( )
inline

Definition at line 55 of file qfontengine_ft_p.h.

Referenced by QFontEngineFT::lockFace().

+ Here is the caller graph for this function:

◆ properties()

QFontEngine::Properties QFreetypeFace::properties ( ) const

Definition at line 426 of file qfontengine_ft.cpp.

References QFixed::fromFixed().

Referenced by QFontEngineFT::properties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ release()

void QFreetypeFace::release ( const QFontEngine::FaceId face_id)

Definition at line 304 of file qfontengine_ft.cpp.

References QHash< Key, T >::constEnd(), QHash< Key, T >::constFind(), QHash< Key, T >::erase(), QtFreetypeData::faces, QHash< Key, T >::isEmpty(), it, QtFreetypeData::library, and qt_getFreetypeData().

Referenced by QFontEngineFT::~QFontEngineFT(), and getFace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unlock()

void QFreetypeFace::unlock ( )
inline

Definition at line 59 of file qfontengine_ft_p.h.

Referenced by QFontEngineFT::unlockFace().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QFontEngineFT

friend class QFontEngineFT
friend

Definition at line 84 of file qfontengine_ft_p.h.

◆ QtFreetypeData

friend class QtFreetypeData
friend

Definition at line 85 of file qfontengine_ft_p.h.

Member Data Documentation

◆ cmapCache

glyph_t QFreetypeFace::cmapCache[cmapCacheSize]

Definition at line 72 of file qfontengine_ft_p.h.

Referenced by QFontEngineFT::glyphIndex(), and QFontEngineFT::stringToCMap().

◆ face

◆ matrix

◆ symbol_map

FT_CharMap QFreetypeFace::symbol_map

◆ unicode_map

FT_CharMap QFreetypeFace::unicode_map

Definition at line 68 of file qfontengine_ft_p.h.

Referenced by QFontEngineFT::glyphIndex(), and QFontEngineFT::stringToCMap().

◆ xsize

int QFreetypeFace::xsize

Definition at line 65 of file qfontengine_ft_p.h.

Referenced by computeSize(), and QFontEngineFT::lockFace().

◆ ysize

int QFreetypeFace::ysize

Definition at line 66 of file qfontengine_ft_p.h.

Referenced by computeSize(), and QFontEngineFT::lockFace().


The documentation for this class was generated from the following files: