Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qfontengine_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QFONTENGINE_P_H
5#define QFONTENGINE_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtGui/private/qtguiglobal_p.h>
19#include <QtGui/qfontvariableaxis.h>
20#include "QtCore/qatomic.h"
21#include <QtCore/qvarlengtharray.h>
22#include <QtCore/qhashfunctions.h>
23#include "private/qtextengine_p.h"
24#include "private/qfont_p.h"
25
26QT_BEGIN_NAMESPACE
27
28class QPainterPath;
29class QFontEngineGlyphCache;
30
31struct QGlyphLayout;
32
33// ### this only used in getPointInOutline(), refactor it and then remove these magic numbers
41
42typedef void (*qt_destroy_func_t) (void *user_data);
43typedef bool (*qt_get_font_table_func_t) (void *user_data, uint tag, uchar *buffer, uint *length);
44
46
47class Q_GUI_EXPORT QFontEngine
48{
49public:
50 enum Type {
51 Box,
52 Multi,
53
54 // MS Windows types
55 Win,
56
57 // Apple Mac OS types
58 Mac,
59
60 // QWS types
61 Freetype,
62 QPF1,
63 QPF2,
64 Proxy,
65
66 DirectWrite,
67
68 TestFontEngine = 0x1000
69 };
70
71 enum GlyphFormat {
72 Format_None,
73 Format_Render = Format_None,
74 Format_Mono,
75 Format_A8,
76 Format_A32,
77 Format_ARGB
78 };
79
80 enum ShaperFlag {
81 DesignMetrics = 0x0002,
82 GlyphIndicesOnly = 0x0004,
83 FullStringFallback = 0x008
84 };
85 Q_DECLARE_FLAGS(ShaperFlags, ShaperFlag)
86
87 /* Used with the Freetype font engine. */
88 struct Glyph {
89 Glyph() = default;
90 ~Glyph() { delete [] data; }
91 short linearAdvance = 0;
92 unsigned short width = 0;
93 unsigned short height = 0;
94 short x = 0;
95 short y = 0;
96 short advance = 0;
97 signed char format = 0;
98 uchar *data = nullptr;
99 private:
100 Q_DISABLE_COPY(Glyph)
101 };
102
103 virtual ~QFontEngine();
104
105 inline Type type() const { return m_type; }
106
107 // all of these are in unscaled metrics if the engine supports uncsaled metrics,
108 // otherwise in design metrics
109 struct Properties {
110 QByteArray postscriptName;
111 QByteArray copyright;
112 QRectF boundingBox;
113 QFixed emSquare;
114 QFixed ascent;
115 QFixed descent;
116 QFixed leading;
117 QFixed italicAngle;
118 QFixed capHeight;
119 QFixed lineWidth;
120 };
121 virtual Properties properties() const;
122 virtual void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics);
123 QByteArray getSfntTable(uint tag) const;
124 virtual bool getSfntTableData(uint tag, uchar *buffer, uint *length) const;
125
126 struct FaceId {
127 FaceId() : index(0), instanceIndex(-1), encoding(0) {}
128 QByteArray filename;
129 QByteArray uuid;
130 int index;
131 int instanceIndex;
132 int encoding;
133 QMap<QFont::Tag, float> variableAxes;
134 };
135 virtual FaceId faceId() const { return FaceId(); }
136 enum SynthesizedFlags {
137 SynthesizedItalic = 0x1,
138 SynthesizedBold = 0x2,
139 SynthesizedStretch = 0x4
140 };
141 virtual int synthesized() const { return 0; }
142 inline bool supportsSubPixelPositions() const
143 {
144 return supportsHorizontalSubPixelPositions() || supportsVerticalSubPixelPositions();
145 }
146 virtual bool supportsHorizontalSubPixelPositions() const { return false; }
147 virtual bool supportsVerticalSubPixelPositions() const { return false; }
148 virtual QFixedPoint subPixelPositionFor(const QFixedPoint &position) const;
149 QFixed subPixelPositionForX(QFixed x) const
150 {
151 return subPixelPositionFor(QFixedPoint(x, 0)).x;
152 }
153
154 bool preferTypoLineMetrics() const;
155 bool isColorFont() const { return glyphFormat == Format_ARGB; }
156 static bool isIgnorableChar(char32_t ucs4)
157 {
158 return ucs4 == QChar::LineSeparator
159 || ucs4 == QChar::LineFeed
160 || ucs4 == QChar::CarriageReturn
161 || ucs4 == QChar::ParagraphSeparator
162 || (!disableEmojiSegmenter() && (ucs4 & 0xFFF0) == 0xFE00)
163 || QChar::category(ucs4) == QChar::Other_Control;
164 }
165
166 static int maxCachedGlyphSize();
167
168 virtual QFixed emSquareSize() const;
169
170 /* returns 0 as glyph index for non existent glyphs */
171 virtual glyph_t glyphIndex(uint ucs4) const = 0;
172 virtual int stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const = 0;
173 virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const {}
174 virtual void doKerning(QGlyphLayout *, ShaperFlags) const;
175
176 virtual void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nglyphs,
177 QPainterPath *path, QTextItem::RenderFlags flags);
178
179 void getGlyphPositions(const QGlyphLayout &glyphs, const QTransform &matrix, QTextItem::RenderFlags flags,
180 QVarLengthArray<glyph_t> &glyphs_out, QVarLengthArray<QFixedPoint> &positions);
181
182 virtual void addOutlineToPath(qreal, qreal, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags flags);
183 void addBitmapFontToPath(qreal x, qreal y, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags);
184 /**
185 * Create a qimage with the alpha values for the glyph.
186 * Returns an image indexed_8 with index values ranging from 0=fully transparent to 255=opaque
187 */
188 // ### Refactor this into a smaller and more flexible API.
189 virtual QImage alphaMapForGlyph(glyph_t);
190 virtual QImage alphaMapForGlyph(glyph_t glyph, const QFixedPoint &subPixelPosition);
191 virtual QImage alphaMapForGlyph(glyph_t, const QTransform &t);
192 virtual QImage alphaMapForGlyph(glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t);
193 virtual QImage alphaRGBMapForGlyph(glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t);
194 virtual QImage bitmapForGlyph(glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t, const QColor &color = QColor());
195 QImage renderedPathForGlyph(glyph_t glyph, const QColor &color);
196
197 qreal effectivePixelSizeSquared(const QTransform &transform) const;
198 static bool glyphBoundingBoxExceedsLimit(qreal glyphWidth,
199 qreal glyphHeight,
200 qreal effectivePixelSizeSquared);
201 bool glyphTransformExceedsLimit(glyph_t glyph, const QTransform &transform);
202
203 virtual Glyph *glyphData(glyph_t glyph, const QFixedPoint &subPixelPosition, GlyphFormat neededFormat, const QTransform &t);
204 virtual bool hasInternalCaching() const { return false; }
205
206 virtual glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, const QFixedPoint &/*subPixelPosition*/, const QTransform &matrix, GlyphFormat /*format*/)
207 {
208 return boundingBox(glyph, matrix);
209 }
210
211 virtual void removeGlyphFromCache(glyph_t);
212
213 virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs);
214 virtual glyph_metrics_t boundingBox(glyph_t glyph) = 0;
215 virtual glyph_metrics_t boundingBox(glyph_t glyph, const QTransform &matrix);
216 glyph_metrics_t tightBoundingBox(const QGlyphLayout &glyphs, QTextItem::RenderFlags flags);
217
218 virtual QFixed ascent() const;
219 virtual QFixed capHeight() const = 0;
220 virtual QFixed descent() const;
221 virtual QFixed leading() const;
222 virtual QFixed xHeight() const;
223 virtual QFixed averageCharWidth() const;
224
225 virtual QFixed lineThickness() const;
226 virtual QFixed underlinePosition() const;
227
228 virtual qreal maxCharWidth() const = 0;
229 virtual qreal minLeftBearing() const;
230 virtual qreal minRightBearing() const;
231
232 virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = nullptr, qreal *rightBearing = nullptr);
233
234 inline bool canRender(uint ucs4) const { return glyphIndex(ucs4) != 0; }
235 virtual bool canRender(const QChar *str, int len) const;
236
237 virtual bool supportsTransformation(const QTransform &transform) const;
238
239 virtual int glyphCount() const;
240 virtual int glyphMargin(GlyphFormat format) { return format == Format_A32 ? 2 : 0; }
241 bool hasHinting() const;
242
243 virtual QFontEngine *cloneWithSize(qreal /*pixelSize*/) const { return nullptr; }
244
245 virtual Qt::HANDLE handle() const;
246
247 virtual QList<QFontVariableAxis> variableAxes() const;
248
249 virtual QString glyphName(glyph_t index) const;
250 virtual glyph_t findGlyph(QLatin1StringView name) const;
251
252 void *harfbuzzFont() const;
253 void *harfbuzzFace() const;
254 bool supportsScript(QChar::Script script) const;
255
256 inline static bool scriptRequiresOpenType(QChar::Script script)
257 {
258 return ((script >= QChar::Script_Syriac && script <= QChar::Script_Sinhala)
259 || script == QChar::Script_Khmer || script == QChar::Script_Nko);
260 }
261
262 virtual int getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints);
263
264 void clearGlyphCache(const void *key);
265 void setGlyphCache(const void *key, QFontEngineGlyphCache *data);
266 QFontEngineGlyphCache *glyphCache(const void *key, GlyphFormat format, const QTransform &transform, const QColor &color = QColor()) const;
267
268 static const uchar *getCMap(const uchar *table, uint tableSize, bool *isSymbolFont, int *cmapSize);
269 static quint32 getTrueTypeGlyphIndex(const uchar *cmap, int cmapSize, uint unicode);
270
271 static QByteArray convertToPostscriptFontFamilyName(const QByteArray &fontFamily);
272
273 virtual bool hasUnreliableGlyphOutline() const;
274 virtual bool expectsGammaCorrectedBlending(QFontEngine::GlyphFormat format) const;
275
276 static bool disableEmojiSegmenter();
277
278 static constexpr qsizetype maximumEngineCount() { return 256; }
279
280 enum HintStyle {
281 HintUnset = -1,
282 HintNone,
283 HintLight,
284 HintMedium,
285 HintFull
286 };
287 virtual void setDefaultHintStyle(HintStyle) { }
288
289 enum SubpixelAntialiasingType {
290 Subpixel_Unset = -1,
291 Subpixel_None,
292 Subpixel_RGB,
293 Subpixel_BGR,
294 Subpixel_VRGB,
295 Subpixel_VBGR
296 };
297
298private:
299 const Type m_type;
300
301public:
302 QAtomicInt ref;
303 QFontDef fontDef;
304
305 class Holder { // replace by std::unique_ptr once available
306 void *ptr;
307 qt_destroy_func_t destroy_func;
308 public:
309 Holder() : ptr(nullptr), destroy_func(nullptr) {}
310 explicit Holder(void *p, qt_destroy_func_t d) : ptr(p), destroy_func(d) {}
311 ~Holder() { if (ptr && destroy_func) destroy_func(ptr); }
312 Holder(Holder &&other) noexcept
313 : ptr(std::exchange(other.ptr, nullptr)),
314 destroy_func(std::exchange(other.destroy_func, nullptr))
315 {
316 }
317 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(Holder)
318
319 void swap(Holder &other) noexcept
320 {
321 qSwap(ptr, other.ptr);
322 qSwap(destroy_func, other.destroy_func);
323 }
324
325 void *get() const noexcept { return ptr; }
326 void *release() noexcept {
327 void *result = ptr;
328 ptr = nullptr;
329 destroy_func = nullptr;
330 return result;
331 }
332 void reset() noexcept { Holder().swap(*this); }
333 qt_destroy_func_t get_deleter() const noexcept { return destroy_func; }
334
335 bool operator!() const noexcept { return !ptr; }
336 };
337
338 mutable Holder font_; // \ NOTE: Declared before m_glyphCaches, so font_, face_
339 mutable Holder face_; // / are destroyed _after_ m_glyphCaches is destroyed.
340
341 struct FaceData {
342 void *user_data;
343 qt_get_font_table_func_t get_font_table;
344 } faceData;
345
346 uint cache_cost; // amount of mem used in bytes by the font
347 uint fsType : 16;
348 bool symbol;
349 bool isSmoothlyScalable;
350 struct KernPair {
351 uint left_right;
352 QFixed adjust;
353
354 inline bool operator<(const KernPair &other) const
355 {
356 return left_right < other.left_right;
357 }
358 };
359 QList<KernPair> kerning_pairs;
360 void loadKerningPairs(QFixed scalingFactor);
361
362 GlyphFormat glyphFormat;
363 int m_subPixelPositionCount; // Number of positions within a single pixel for this cache
364
365protected:
366 explicit QFontEngine(Type type);
367
368 QFixed firstLeftBearing(const QGlyphLayout &glyphs);
369 QFixed lastRightBearing(const QGlyphLayout &glyphs);
370
371 QFixed calculatedCapHeight() const;
372
373 mutable QFixed m_ascent;
374 mutable QFixed m_descent;
375 mutable QFixed m_leading;
376 mutable bool m_heightMetricsQueried;
377
378 virtual void initializeHeightMetrics() const;
379 bool processHheaTable() const;
380 bool processOS2Table() const;
381
382private:
383 struct GlyphCacheEntry {
384 GlyphCacheEntry();
385 GlyphCacheEntry(const GlyphCacheEntry &);
386 ~GlyphCacheEntry();
387
388 GlyphCacheEntry &operator=(const GlyphCacheEntry &);
389
390 QExplicitlySharedDataPointer<QFontEngineGlyphCache> cache;
391 bool operator==(const GlyphCacheEntry &other) const { return cache == other.cache; }
392 };
393 typedef std::list<GlyphCacheEntry> GlyphCaches;
394 mutable QHash<const void *, GlyphCaches> m_glyphCaches;
395
396private:
397 mutable qreal m_minLeftBearing;
398 mutable qreal m_minRightBearing;
399 mutable int m_hasHinting = -1;
400};
402
403Q_DECLARE_OPERATORS_FOR_FLAGS(QFontEngine::ShaperFlags)
404
405inline bool operator ==(const QFontEngine::FaceId &f1, const QFontEngine::FaceId &f2)
406{
407 return f1.index == f2.index
408 && f1.encoding == f2.encoding
409 && f1.filename == f2.filename
410 && f1.uuid == f2.uuid
411 && f1.instanceIndex == f2.instanceIndex
412 && f1.variableAxes == f2.variableAxes;
413}
414
415inline size_t qHash(const QFontEngine::FaceId &f, size_t seed = 0)
416 noexcept(noexcept(qHash(f.filename)))
417{
418 return qHashMulti(seed, f.filename, f.uuid, f.index, f.instanceIndex, f.encoding, f.variableAxes.keys(), f.variableAxes.values());
419}
420
421
422class QGlyph;
423
424
425
427{
428public:
429 QFontEngineBox(int size);
431
432 virtual glyph_t glyphIndex(uint ucs4) const override;
433 virtual int stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const override;
434 virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const override;
435
436 void draw(QPaintEngine *p, qreal x, qreal y, const QTextItemInt &si);
437 virtual void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, QPainterPath *path, QTextItem::RenderFlags flags) override;
438
439 virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs) override;
440 virtual glyph_metrics_t boundingBox(glyph_t glyph) override;
441 virtual QFontEngine *cloneWithSize(qreal pixelSize) const override;
442
443 virtual QFixed emSquareSize() const override { return _size; }
444 virtual QFixed ascent() const override;
445 virtual QFixed capHeight() const override;
446 virtual QFixed descent() const override;
447 virtual QFixed leading() const override;
448 virtual qreal maxCharWidth() const override;
449 virtual qreal minLeftBearing() const override { return 0; }
450 virtual qreal minRightBearing() const override { return 0; }
451 virtual QImage alphaMapForGlyph(glyph_t) override;
452
453 virtual bool canRender(const QChar *string, int len) const override;
454
455 inline int size() const { return _size; }
456
457protected:
458 explicit QFontEngineBox(Type type, int size);
459
460private:
461 friend class QFontPrivate;
462 int _size;
463};
464
465class Q_GUI_EXPORT QFontEngineMulti : public QFontEngine
466{
467public:
468 explicit QFontEngineMulti(QFontEngine *engine, int script, const QStringList &fallbackFamilies = QStringList());
469 ~QFontEngineMulti();
470
471 virtual int glyphCount() const override;
472 virtual glyph_t glyphIndex(uint ucs4) const override;
473 virtual int stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const override;
474
475 virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs) override;
476 virtual glyph_metrics_t boundingBox(glyph_t glyph) override;
477
478 virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const override;
479 virtual void doKerning(QGlyphLayout *, ShaperFlags) const override;
480 virtual void addOutlineToPath(qreal, qreal, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags flags) override;
481 virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = nullptr, qreal *rightBearing = nullptr) override;
482
483 virtual QFixed emSquareSize() const override;
484 virtual QFixed ascent() const override;
485 virtual QFixed capHeight() const override;
486 virtual QFixed descent() const override;
487 virtual QFixed leading() const override;
488 virtual QFixed xHeight() const override;
489 virtual QFixed averageCharWidth() const override;
490 virtual QImage alphaMapForGlyph(glyph_t) override;
491 virtual QImage alphaMapForGlyph(glyph_t glyph, const QFixedPoint &subPixelPosition) override;
492 virtual QImage alphaMapForGlyph(glyph_t, const QTransform &t) override;
493 virtual QImage alphaMapForGlyph(glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t) override;
494 virtual QImage alphaRGBMapForGlyph(glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t) override;
495
496 virtual QFixed lineThickness() const override;
497 virtual QFixed underlinePosition() const override;
498 virtual qreal maxCharWidth() const override;
499 virtual qreal minLeftBearing() const override;
500 virtual qreal minRightBearing() const override;
501
502 virtual QList<QFontVariableAxis> variableAxes() const override;
503
504 virtual bool canRender(const QChar *string, int len) const override;
505 QString glyphName(glyph_t glyph) const override;
506 glyph_t findGlyph(QLatin1StringView name) const override;
507
508 inline int fallbackFamilyCount() const { return m_fallbackFamilies.size(); }
509 inline QString fallbackFamilyAt(int at) const { return m_fallbackFamilies.at(at); }
510
511 void setFallbackFamiliesList(const QStringList &fallbackFamilies);
512
513 static uchar highByte(glyph_t glyph); // Used for determining engine
514
515 inline QFontEngine *engine(int at) const
516 { Q_ASSERT(at < m_engines.size()); return m_engines.at(at); }
517
518 void ensureEngineAt(int at);
519
520 static QFontEngine *createMultiFontEngine(QFontEngine *fe, int script);
521
522protected:
523 virtual void ensureFallbackFamiliesQueried();
524 virtual bool shouldLoadFontEngineForCharacter(int at, uint ucs4) const;
525 virtual QFontEngine *loadEngine(int at);
526
527private:
528 QList<QFontEngine *> m_engines;
529 QStringList m_fallbackFamilies;
530 const int m_script;
531 bool m_fallbackFamiliesQueried;
532};
533
535{
536public:
537 QTestFontEngine(int size);
538};
539
540QT_END_NAMESPACE
541
542
543
544#endif // QFONTENGINE_P_H
\inmodule QtCore
Definition qbytearray.h:58
virtual QFixed emSquareSize() const override
virtual glyph_metrics_t boundingBox(glyph_t glyph) override
virtual QImage alphaMapForGlyph(glyph_t) override
virtual qreal maxCharWidth() const override
virtual QFontEngine * cloneWithSize(qreal pixelSize) const override
int size() const
virtual qreal minLeftBearing() const override
virtual int stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const override
virtual QFixed leading() const override
virtual bool canRender(const QChar *string, int len) const override
virtual QFixed descent() const override
virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const override
virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs) override
QFontEngineBox(Type type, int size)
virtual QFixed ascent() const override
virtual QFixed capHeight() const override
virtual qreal minRightBearing() const override
QFontEngineBox(int size)
\inmodule QtCore
Definition qmutex.h:346
friend class QFontEngine
Definition qpainter.h:433
\inmodule QtCore
Definition qmutex.h:342
QTestFontEngine(int size)
Combined button and popup list for selecting options.
QList< QString > QStringList
Constructs a string list that contains the given string, str.
#define qApp
Q_DECLARE_TYPEINFO(QDateTime::Data, Q_RELOCATABLE_TYPE)
Q_TRACE_POINT(qtcore, QFactoryLoader_update, const QString &fileName)
QRecursiveMutex * qt_fontdatabase_mutex()
static bool familySupportsWritingSystem(QtFontFamily *family, size_t writingSystem)
void qt_registerFont(const QString &familyName, const QString &stylename, const QString &foundryname, int weight, QFont::Style style, int stretch, bool antialiased, bool scalable, int pixelSize, bool fixedPitch, bool colorFont, const QSupportedWritingSystems &writingSystems, void *handle)
static bool equalsCaseInsensitive(const QString &a, const QString &b)
static void parseFontName(const QString &name, QString &foundry, QString &family)
static const int scriptForWritingSystem[]
bool qt_isFontFamilyPopulated(const QString &familyName)
#define SMOOTH_SCALABLE
static QString styleStringHelper(int weight, QFont::Style style)
static int getFontWeight(const QString &weightString)
static bool matchFamilyName(const QString &familyName, QtFontFamily *f)
Q_GUI_EXPORT int qt_script_for_writing_system(QFontDatabase::WritingSystem writingSystem)
Q_TRACE_POINT(qtgui, QFontDatabase_loadEngine, const QString &families, int pointSize)
static QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QFontDatabasePrivate::ExtendedScript script)
static void initFontDef(const QtFontDesc &desc, const QFontDef &request, QFontDef *fontDef, bool multi)
QStringList qt_fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QFontDatabasePrivate::ExtendedScript script)
void qt_registerFontFamily(const QString &familyName)
void qt_registerAliasToFontFamily(const QString &familyName, const QString &alias)
QString qt_resolveFontFamilyAlias(const QString &alias)
static QStringList familyList(const QFontDef &req)
void qt_cleanupFontDatabase()
static QtFontStyle * bestStyle(QtFontFoundry *foundry, const QtFontStyle::Key &styleKey, const QString &styleName=QString())
bool operator==(const QtFontFallbacksCacheKey &lhs, const QtFontFallbacksCacheKey &rhs) noexcept
size_t qHash(const QtFontFallbacksCacheKey &key, size_t seed=0) noexcept
bool operator!=(const QtFontFallbacksCacheKey &lhs, const QtFontFallbacksCacheKey &rhs) noexcept
bool(* qt_get_font_table_func_t)(void *user_data, uint tag, uchar *buffer, uint *length)
void(* qt_destroy_func_t)(void *user_data)
HB_Compat_Error
@ Err_Invalid_SubTable_Format
@ Err_Invalid_SubTable
@ Err_Invalid_Argument
@ Err_Ok
@ Err_Not_Covered
#define qGuiApp
#define Q_LOGGING_CATEGORY(name,...)
#define qCInfo(category,...)
#define qCWarning(category,...)
#define qCDebug(category,...)
#define Q_DECLARE_LOGGING_CATEGORY(name)
constexpr size_t qHash(const QSize &s, size_t seed=0) noexcept
Definition qsize.h:192
QtFontFamily * family
QtFontSize * size
QtFontStyle * style
QtFontFoundry * foundry
QFont::StyleHint styleHint
QtFontStyle * style(const QtFontStyle::Key &, const QString &=QString(), StyleRetrievalFlags flags=NoRetrievalFlags)
QtFontStyle ** styles