39 #ifndef QFONTENGINE_FT_P_H
40 #define QFONTENGINE_FT_P_H
52 #include "private/qfontengine_p.h"
54 #ifndef QT_NO_FREETYPE
57 #include FT_FREETYPE_H
70 class QFontEngineFTRawFont;
80 void computeSize(
const QFontDef &fontDef,
int *xsize,
int *ysize,
bool *outline_drawing,
QFixed *scalableBitmapScaleFactor);
88 static int getFaceIndexByStyleName(
const QString &faceFileName,
const QString &styleName);
107 enum { cmapCacheSize = 0x200 };
114 bool isScalableBitmap()
const;
151 return glyph ==
other.glyph && subPixelPosition ==
other.subPixelPosition;
168 return (
index < 256 && subPixelPosition.
x == 0 && subPixelPosition.
y == 0);
180 mutable Glyph *fast_glyph_data[256];
181 mutable int fast_glyph_count;
186 QFixed emSquareSize()
const override;
189 return default_hint_style == HintLight ||
190 default_hint_style == HintNone;
195 return supportsHorizontalSubPixelPositions();
199 int synthesized()
const override;
201 void initializeHeightMetrics()
const override;
202 QFixed capHeight()
const override;
203 QFixed xHeight()
const override;
204 QFixed averageCharWidth()
const override;
206 qreal maxCharWidth()
const override;
207 QFixed lineThickness()
const override;
208 QFixed underlinePosition()
const override;
211 void doKerning(
QGlyphLayout *, ShaperFlags)
const override;
238 Glyph *glyphData(
glyph_t glyph,
240 GlyphFormat neededFormat,
243 bool expectsGammaCorrectedBlending()
const override;
245 void removeGlyphFromCache(
glyph_t glyph)
override;
248 int glyphCount()
const override;
255 void unlockFace()
const;
257 FT_Face non_locked_face()
const;
260 inline bool invalid()
const {
return xsize == 0 && ysize == 0; }
261 inline bool isBitmapFont()
const {
return defaultFormat == Format_Mono; }
267 bool fetchMetricsOnly =
false,
268 bool disableOutlineDrawing =
false)
const
269 {
return loadGlyph(cacheEnabled ? &defaultGlyphSet :
nullptr, glyph, subPixelPosition,
format, fetchMetricsOnly, disableOutlineDrawing); }
270 Glyph *loadGlyph(QGlyphSet *
set,
273 GlyphFormat = Format_None,
274 bool fetchMetricsOnly =
false,
275 bool disableOutlineDrawing =
false)
const;
280 bool fetchBoundingBox =
false,
281 bool disableOutlineDrawing =
false);
288 bool init(FaceId faceId,
bool antiaalias, GlyphFormat defaultFormat = Format_None,
290 bool init(FaceId faceId,
bool antialias, GlyphFormat
format,
296 void setDefaultHintStyle(HintStyle
style)
override;
324 friend class QFontEngineFTRawFont;
330 bool shouldUseDesignMetrics(ShaperFlags
flags)
const;
337 struct TransformedGlyphSets {
339 QGlyphSet *sets[nSets];
342 TransformedGlyphSets() {
std::fill(&sets[0], &sets[nSets],
nullptr); }
343 ~TransformedGlyphSets() {
qDeleteAll(&sets[0], &sets[nSets]); }
345 void moveToFront(
int i);
348 TransformedGlyphSets transformedGlyphSets;
349 mutable QGlyphSet defaultGlyphSet;
360 mutable bool kerning_pairs_loaded;
361 QFixed scalableBitmapScaleFactor;
371 g.subPixelPosition.x.value(),
372 g.subPixelPosition.y.value());
379 return fast_glyph_data[
index];
small capitals from c petite p scientific i
[1]
The QAtomicInt class provides platform-independent atomic operations on int.
The QByteArray class provides an array of bytes.
The QChar class provides a 16-bit Unicode character.
The QColor class provides colors based on RGB, HSV or CMYK values.
template< typename Enum > size_t qHash(QFlags< Enum > flags, size_t seed=0) noexcept
int glyphMargin(QFontEngine::GlyphFormat) override
HintStyle defaultHintStyle() const
Glyph * loadGlyph(uint glyph, const QFixedPoint &subPixelPosition, GlyphFormat format=Format_None, bool fetchMetricsOnly=false, bool disableOutlineDrawing=false) const
bool drawAntialiased() const
HintStyle default_hint_style
bool supportsVerticalSubPixelPositions() const override
QImage alphaMapForGlyph(glyph_t g) override
bool isScalableBitmap() const
bool supportsHorizontalSubPixelPositions() const override
bool isBitmapFont() const
bool hasInternalCaching() const override
SubpixelAntialiasingType subpixelType
The QHash class is a template class that provides a hash-table-based dictionary.
template< typename... T > size_t qHashMulti(size_t seed, const T &...args)
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
The QRecursiveMutex class provides access serialization between threads.
The QString class provides a Unicode character string.
qDeleteAll(list.begin(), list.end())
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld init[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld SRC pixld MASK if DST_R else pixld DST_R endif if src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head if pixblock_size cache_preload_simple endif process_pixblock_tail pixinterleave dst_w_basereg irp if pixblock_size chunk_size tst beq if DST_W else pixst DST_W else mov ORIG_W endif add lsl if lsl endif if lsl endif lsl endif lsl endif lsl endif subs mov DST_W if regs_shortage str endif bge start_of_loop_label endm macro generate_composite_function
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld cleanup[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld SRC pixld MASK if DST_R else pixld DST_R endif if src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head if pixblock_size cache_preload_simple endif process_pixblock_tail pixinterleave dst_w_basereg irp if pixblock_size chunk_size tst beq if DST_W else pixst DST_W else mov ORIG_W endif add lsl if lsl endif if lsl endif lsl endif lsl endif lsl endif subs mov DST_W if regs_shortage str endif bge start_of_loop_label endm macro generate_composite_function
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
Q_GUI_EXPORT FT_Library qt_getFreetype()
Q_DECLARE_TYPEINFO(QFontEngineFT::QGlyphSet, Q_RELOCATABLE_TYPE)
QT_BEGIN_INCLUDE_NAMESPACE typedef unsigned char uchar
QT_END_INCLUDE_NAMESPACE typedef double qreal
#define Q_DISABLE_COPY(Class)
GLenum GLuint GLenum GLsizei length
GLuint64 GLenum void * handle
GLint GLint GLint GLint GLint x
[0]
GLsizei GLenum const void GLuint GLsizei GLfloat * metrics
GLint GLsizei GLsizei GLenum format
GLenum GLsizeiptr const void * fontData
GLuint GLenum GLenum transform
GLsizei const GLchar *const * path
GLenum GLenum GLenum GLenum GLenum scale
QFuture< QSet< QChar > > set
[10]
QFixedPoint subPixelPosition
bool operator==(const GlyphAndSubPixelPosition &other) const
GlyphAndSubPixelPosition(glyph_t g, const QFixedPoint spp)
bool isGlyphMissing(glyph_t index) const
bool useFastGlyphData(glyph_t index, const QFixedPoint &subPixelPosition) const
FT_Matrix transformationMatrix
Glyph * getGlyph(glyph_t index, const QFixedPoint &subPixelPositionX=QFixedPoint()) const
void setGlyphMissing(glyph_t index) const
T1_FIELD_DICT_FONTDICT T1_FIELD_DICT_FONTDICT T1_FIELD_DICT_FONTDICT underline_position
XmlOutput::xml_output tag(const QString &name)