45 #include "private/qimage_p.h"
46 #include <private/qstringiterator_p.h>
49 #include <qpa/qplatformscreen.h>
50 #include <QtCore/QUuid>
51 #include <QtGui/QPainterPath>
53 #ifndef QT_NO_FREETYPE
65 #include FT_FREETYPE_H
67 #include FT_SYNTHESIS_H
68 #include FT_TRUETYPE_TABLES_H
69 #include FT_TYPE1_TABLES_H
72 #include FT_LCD_FILTER_H
74 #if defined(FT_CONFIG_OPTIONS_H)
75 #include FT_CONFIG_OPTIONS_H
78 #if defined(FT_FONT_FORMATS_H)
79 #include FT_FONT_FORMATS_H
86 #if !defined(QT_MAX_CACHED_GLYPH_SIZE)
87 # define QT_MAX_CACHED_GLYPH_SIZE 64
92 #define FLOOR(x) ((x) & -64)
93 #define CEIL(x) (((x)+63) & -64)
94 #define TRUNC(x) ((x) >> 6)
95 #define ROUND(x) (((x)+32) & -64)
149 iter.value()->cleanup();
174 #if defined(FT_FONT_FORMATS_H)
204 if (
face->glyph->format != FT_GLYPH_FORMAT_OUTLINE)
207 *nPoints =
face->glyph->outline.n_points;
211 if (point > *nPoints)
273 if (!newFreetype->fontData.isEmpty()) {
280 newFreetype->face =
face;
282 newFreetype->ref.storeRelaxed(1);
283 newFreetype->xsize = 0;
284 newFreetype->ysize = 0;
285 newFreetype->matrix.xx = 0x10000;
286 newFreetype->matrix.yy = 0x10000;
287 newFreetype->matrix.xy = 0;
288 newFreetype->matrix.yx = 0;
289 newFreetype->unicode_map =
nullptr;
290 newFreetype->symbol_map =
nullptr;
292 memset(newFreetype->cmapCache, 0,
sizeof(newFreetype->cmapCache));
294 for (
int i = 0;
i < newFreetype->face->num_charmaps; ++
i) {
296 switch(
cm->encoding) {
297 case FT_ENCODING_UNICODE:
298 newFreetype->unicode_map =
cm;
300 case FT_ENCODING_APPLE_ROMAN:
301 case FT_ENCODING_ADOBE_LATIN_1:
302 if (!newFreetype->unicode_map || newFreetype->unicode_map->encoding != FT_ENCODING_UNICODE)
303 newFreetype->unicode_map =
cm;
305 case FT_ENCODING_ADOBE_CUSTOM:
306 case FT_ENCODING_MS_SYMBOL:
307 if (!newFreetype->symbol_map)
308 newFreetype->symbol_map =
cm;
315 if (!
FT_IS_SCALABLE(newFreetype->face) && newFreetype->face->num_fixed_sizes == 1)
316 FT_Set_Char_Size(
face, newFreetype->face->available_sizes[0].x_ppem, newFreetype->face->available_sizes[0].y_ppem, 0, 0);
320 freetypeData->
faces.
insert(face_id, newFreetype.get());
322 newFreetype.release()->release(face_id);
326 freetype = newFreetype.
release();
331 void QFreetypeFace::cleanup()
352 freetypeData->
library =
nullptr;
360 static int computeFaceIndex(
const QString &faceFileName,
const QString &styleName)
377 numFaces =
face->num_faces;
381 if (faceStyleName == styleName)
400 faceIndex = computeFaceIndex(faceFileName, styleName);
411 *scalableBitmapScaleFactor = 1;
412 *outline_drawing =
false;
421 for (
int i = 1;
i <
face->num_fixed_sizes;
i++) {
433 for (
int i = 1;
i <
face->num_fixed_sizes;
i++) {
434 if (
face->available_sizes[
i].y_ppem < *
ysize) {
435 if (
face->available_sizes[
i].y_ppem >
face->available_sizes[best].y_ppem)
437 }
else if (
face->available_sizes[best].y_ppem < *
ysize) {
439 }
else if (
face->available_sizes[
i].y_ppem <
face->available_sizes[best].y_ppem) {
450 *
xsize =
face->available_sizes[best].x_ppem;
451 *
ysize =
face->available_sizes[best].y_ppem;
466 p.copyright = font_info.notice;
468 p.ascent =
face->ascender;
469 p.descent = -
face->descender;
471 p.emSquare =
face->units_per_EM;
479 p.emSquare =
face->size->metrics.y_ppem;
481 p.boundingBox =
QRectF(0, -
p.ascent.toReal(),
482 face->size->metrics.max_advance/64, (
p.ascent +
p.descent).toReal() );
485 p.capHeight =
p.ascent;
486 p.lineWidth =
face->underline_thickness;
518 #define GLYPH2PATH_DEBUG QT_NO_QDEBUG_MACRO
522 scaleOutline(
face,
g, x_scale, y_scale);
528 for (
int j = 0;
j <
g->outline.n_contours; ++
j) {
529 int last_point =
g->outline.contours[
j];
532 if (!(
g->outline.tags[
i] & 1)) {
533 if (!(
g->outline.tags[last_point] & 1)) {
536 -
g->outline.points[last_point].y*
factor) +
start) / 2.0;
540 -
g->outline.points[last_point].y*
factor);
551 while (
i < last_point) {
555 <<
": on curve =" << (
bool)(
g->outline.tags[
i] & 1);
557 switch (
g->outline.tags[
i] & 3) {
562 c[3] = (
c[3] +
c[2])/2;
569 c[3] = (
c[1] +
c[2])/2;
570 c[2] = (2*
c[1] +
c[3])/3;
571 c[1] = (2*
c[1] +
c[0])/3;
584 c[2] = (2*
c[1] +
c[3])/3;
585 c[1] = (2*
c[1] +
c[0])/3;
590 path->cubicTo(
c[1],
c[2],
c[3]);
597 path->closeSubpath();
601 c[2] = (2*
c[1] +
c[3])/3;
602 c[1] = (2*
c[1] +
c[0])/3;
605 path->cubicTo(
c[1],
c[2],
c[3]);
615 if (slot->
format != FT_GLYPH_FORMAT_BITMAP
626 const int offs = bgr ? -1 : 1;
630 for (
int x = 0;
x <
w;
x += 3) {
634 *dd++ = (0xFFU << 24) | (
red << 16) | (
green << 8) |
blue;
643 const int offs = bgr ? -src_pitch : src_pitch;
657 static int type = -1;
667 auto engine = std::make_unique<QFontEngineFT>(
fontDef);
684 qWarning(
"QFontEngineFT: Failed to create FreeType font engine");
689 return engine.release();
700 void updateFamilyNameAndStyle()
730 QFontEngineFTRawData *fe =
new QFontEngineFTRawData(
fontDef);
736 fe->updateFamilyNameAndStyle();
751 kerning_pairs_loaded =
false;
763 const QByteArray env = qgetenv(
"QT_NO_FT_CACHE");
782 static void dont_delete(
void*) {}
823 if (os2->usWeightClass < 700 &&
824 (
fontDef.
pixelSize < 64 || qEnvironmentVariableIsSet(
"QT_NO_SYNTHESIZED_BOLD_LIMIT"))) {
832 underline_position = center_position - line_thickness / 2;
836 line_thickness = score / 700;
838 if (line_thickness < 2 && score >= 1050)
840 underline_position = ((line_thickness * 2) + 3) / 6;
843 glyphFormat = defaultFormat = GlyphFormat::Format_ARGB;
847 if (line_thickness < 1)
860 for (
int i = 0;
i <
face->num_fixed_sizes; ++
i) {
861 if (xsize ==
face->available_sizes[
i].x_ppem && ysize ==
face->available_sizes[
i].y_ppem) {
865 if (
face->size->metrics.ascender +
face->size->metrics.descender > 0) {
882 #if defined(FT_FONT_FORMATS_H)
884 if (fmt &&
qstrncmp(fmt,
"CFF", 4) == 0) {
885 FT_Bool no_stem_darkening =
true;
915 switch (hintingPreference) {
941 int QFontEngineFT::loadFlags(QGlyphSet *
set, GlyphFormat
format,
int flags,
942 bool &hsubpixel,
int &vfactor)
const
962 if (
set &&
set->outline_drawing)
968 load_flags |= load_target;
979 return info.width > 0xFF ||
info.height > 0xFF ||
info.linearAdvance > 0x7FFF;
1021 bool fetchMetricsOnly,
1022 bool disableOutlineDrawing)
const
1030 Glyph *
g =
set ?
set->getGlyph(glyph, subPixelPosition) :
nullptr;
1031 if (
g &&
g->format ==
format && (fetchMetricsOnly ||
g->data))
1034 if (!
g &&
set &&
set->isGlyphMissing(glyph))
1047 bool hsubpixel =
false;
1049 int load_flags = loadFlags(
set,
format, 0, hsubpixel, vfactor);
1064 if (err == FT_Err_Too_Few_Arguments) {
1068 }
else if (err == FT_Err_Execution_Too_Long) {
1071 qWarning(
"load glyph failed due to broken hinting bytecode in font, switching to auto hinting");
1077 qWarning(
"load glyph failed err=%x face=%p, glyph=%d", err,
face, glyph);
1079 set->setGlyphMissing(glyph);
1107 if ((
set &&
set->outline_drawing && !disableOutlineDrawing) || fetchMetricsOnly) {
1128 if (areMetricsTooLarge(
info))
1133 g->linearAdvance =
info.linearAdvance;
1134 g->width =
info.width;
1135 g->height =
info.height;
1138 g->advance =
info.xOff;
1142 set->setGlyph(glyph, subPixelPosition,
g);
1147 int glyph_buffer_size = 0;
1148 std::unique_ptr<uchar[]> glyph_buffer;
1155 if (!hsubpixel && vfactor == 1) {
1156 qWarning(
"Format_A32 requested, but subpixel layout is unknown.");
1172 qWarning(
"render glyph failed err=%x face=%p, glyph=%d", err,
face, glyph);
1183 info.height =
info.height / vfactor;
1188 glyph_buffer_size =
info.height * pitch;
1189 glyph_buffer.reset(
new uchar[glyph_buffer_size]);
1197 int bytes = ((
info.width + 7) & ~7) >> 3;
1199 memcpy (
dst,
src, bytes);
1205 for (
int x = 0;
x <
int{
info.width};
x++)
1206 dst[
x] = ((
src[
x >> 3] & (0x80 >> (
x & 7))) ? 0xff : 0x00);
1213 for (
int x = 0;
x <
int{
info.width};
x++)
1214 dd[
x] = ((
src[
x >> 3] & (0x80 >> (
x & 7))) ? 0xffffffff : 0x00000000);
1225 #if Q_BYTE_ORDER == Q_BIG_ENDIAN
1229 const quint32 pixel = *srcPixel;
1230 *dstPixel =
qbswap(pixel);
1244 int bytes =
info.width;
1246 memcpy (
dst,
src, bytes);
1266 g->linearAdvance =
info.linearAdvance;
1267 g->width =
info.width;
1268 g->height =
info.height;
1271 g->advance =
info.xOff;
1274 g->data = glyph_buffer.release();
1277 set->setGlyph(glyph, subPixelPosition,
g);
1290 if (
p.postscriptName.isEmpty()) {
1330 if (scalableBitmapScaleFactor != 1) {
1331 m_ascent *= scalableBitmapScaleFactor;
1340 if (os2 && os2->
version >= 2) {
1378 if (scalableBitmapScaleFactor != 1)
1379 max_advance *= scalableBitmapScaleFactor;
1380 return max_advance.
toReal();
1385 return line_thickness;
1390 return underline_position;
1395 if (!kerning_pairs_loaded) {
1396 kerning_pairs_loaded =
true;
1407 if (shouldUseDesignMetrics(
flags))
1432 for (;
i < nSets; ++
i) {
1433 QGlyphSet *
g = sets[
i];
1436 if (
g->transformationMatrix.xx ==
m.xx
1437 &&
g->transformationMatrix.xy ==
m.xy
1438 &&
g->transformationMatrix.yx ==
m.yx
1439 &&
g->transformationMatrix.yy ==
m.yy) {
1451 moveToFront(nSets - 1);
1453 sets[0] =
new QGlyphSet;
1454 QGlyphSet *gs = sets[0];
1456 gs->transformationMatrix =
m;
1463 void QFontEngineFT::TransformedGlyphSets::moveToFront(
int i)
1465 QGlyphSet *
g = sets[
i];
1467 sets[
i] = sets[
i - 1];
1492 int left =
face->glyph->metrics.horiBearingX;
1493 int right =
face->glyph->metrics.horiBearingX +
face->glyph->metrics.width;
1494 int top =
face->glyph->metrics.horiBearingY;
1495 int bottom =
face->glyph->metrics.horiBearingY -
face->glyph->metrics.height;
1536 for (
int gl = 0; gl < glyphs.
numGlyphs; gl++) {
1537 FT_UInt glyph = positioned_glyphs[gl];
1550 for (
int gl = 0; gl <
numGlyphs; gl++) {
1556 if (
g->format != FT_GLYPH_FORMAT_OUTLINE)
1588 if (!glyph &&
symbol && ucs4 < 0x100)
1600 QFontEngine::ShaperFlags
flags)
const
1603 if (*nglyphs <
len) {
1612 while (
it.hasNext()) {
1615 if ( !glyphs->
glyphs[glyph_pos] ) {
1625 if (!glyph && (uc == 0xa0 || uc == 0x9)) {
1633 if (!glyph &&
symbol && uc < 0x100)
1636 glyphs->
glyphs[glyph_pos] = glyph;
1645 while (
it.hasNext()) {
1648 if (!glyphs->
glyphs[glyph_pos]) {
1652 if (!glyph && (uc == 0xa0 || uc == 0x9)) {
1656 glyphs->
glyphs[glyph_pos] = glyph;
1665 *nglyphs = glyph_pos;
1674 bool QFontEngineFT::shouldUseDesignMetrics(QFontEngine::ShaperFlags
flags)
const
1684 return m * scalableBitmapScaleFactor;
1691 t.m21(),
t.m22(),
t.m23(),
1693 const qreal scaleFactor = scalableBitmapScaleFactor.
toReal();
1694 trans.
scale(scaleFactor, scaleFactor);
1696 QRectF rect(
m.x.toReal(),
m.y.toReal(),
m.width.toReal(),
m.height.toReal());
1715 bool design = shouldUseDesignMetrics(
flags);
1720 if (
g &&
g->format == acceptableFormat) {
1739 if (scalableBitmapScaleFactor != 1)
1740 glyphs->
advances[
i] *= scalableBitmapScaleFactor;
1779 overall.
x = qMin(overall.
x,
x);
1780 overall.
y = qMin(overall.
y,
y);
1781 xmax = qMax(xmax,
x.
ceil() +
g->width);
1782 ymax = qMax(ymax,
y.
ceil() +
g->height);
1787 int right =
CEIL(
face->glyph->metrics.horiBearingX +
face->glyph->metrics.width);
1788 int top =
CEIL(
face->glyph->metrics.horiBearingY);
1793 overall.
x = qMin(overall.
x,
x);
1794 overall.
y = qMin(overall.
y,
y);
1801 overall.
width = xmax - overall.
x;
1807 overall = scaledBitmapMetrics(overall,
QTransform());
1827 overall.
width =
g->width;
1829 overall.
xoff =
g->advance;
1834 int right =
CEIL(
face->glyph->metrics.horiBearingX +
face->glyph->metrics.width);
1835 int top =
CEIL(
face->glyph->metrics.horiBearingY);
1848 overall = scaledBitmapMetrics(overall,
QTransform());
1871 overall.
width =
g->width;
1873 overall.
xoff =
g->advance;
1879 int right =
CEIL(
face->glyph->metrics.horiBearingX +
face->glyph->metrics.width);
1880 int top =
CEIL(
face->glyph->metrics.horiBearingY);
1892 overall = scaledBitmapMetrics(overall,
matrix);
1898 if (glyph ==
nullptr || glyph->
height == 0 || glyph->
width == 0)
1902 int bytesPerLine = -1;
1903 switch (glyphFormat) {
1906 bytesPerLine = ((glyph->
width + 31) & ~31) >> 3;
1910 bytesPerLine = (glyph->
width + 3) & ~3;
1914 bytesPerLine = glyph->
width * 4;
1936 neededFormat = defaultFormat;
1947 static inline bool is2dRotation(
const QTransform &
t)
1957 bool fetchBoundingBox,
1958 bool disableOutlineDrawing)
1961 if (glyphSet !=
nullptr && glyphSet->
outline_drawing && !disableOutlineDrawing && !fetchBoundingBox)
1964 Glyph *glyph = glyphSet !=
nullptr ? glyphSet->
getGlyph(
g, subPixelPosition) :
nullptr;
1965 if (!glyph || glyph->
format !=
format || (!fetchBoundingBox && !glyph->
data)) {
1975 glyph =
loadGlyph(glyphSet,
g, subPixelPosition,
format,
false, disableOutlineDrawing);
1995 QImage img = alphaMapFromGlyphData(glyph, neededFormat);
2015 QImage img = alphaMapFromGlyphData(glyph, neededFormat);
2035 if (glyph ==
nullptr)
2039 if (defaultFormat == GlyphFormat::Format_ARGB)
2041 else if (defaultFormat == GlyphFormat::Format_Mono)
2044 if (!
img.isNull() && (!
t.isIdentity() || scalableBitmapScaleFactor != 1)) {
2046 const qreal scaleFactor = scalableBitmapScaleFactor.
toReal();
2047 trans.
scale(scaleFactor, scaleFactor);
2110 : outline_drawing(
false)
2116 memset(fast_glyph_data, 0,
sizeof(fast_glyph_data));
2117 fast_glyph_count = 0;
2127 if (fast_glyph_count > 0) {
2128 for (
int i = 0;
i < 256; ++
i) {
2129 if (fast_glyph_data[
i]) {
2130 delete fast_glyph_data[
i];
2131 fast_glyph_data[
i] =
nullptr;
2134 fast_glyph_count = 0;
2143 if (useFastGlyphData(
index, subPixelPosition)) {
2144 if (fast_glyph_data[
index]) {
2145 delete fast_glyph_data[
index];
2146 fast_glyph_data[
index] =
nullptr;
2147 if (fast_glyph_count > 0)
2159 if (useFastGlyphData(
index, subPixelPosition)) {
2160 if (!fast_glyph_data[
index])
2162 fast_glyph_data[
index] = glyph;
2171 bool hsubpixel =
true;
2173 int load_flags = loadFlags(
nullptr,
Format_A8,
flags, hsubpixel, vfactor);
small capitals from c petite p scientific i
[1]
The QByteArray class provides an array of bytes.
const char * constData() const noexcept
int toInt(bool *ok=nullptr, int base=10) const
bool startsWith(QByteArrayView bv) const
bool isEmpty() const noexcept
The QChar class provides a 16-bit Unicode character.
The QColor class provides colors based on RGB, HSV or CMYK values.
The QFile class provides an interface for reading from and writing to files.
bool open(OpenMode flags) override
static QString decodeName(const QByteArray &localFileName)
The QFileInfo class provides system-independent file information.
template< typename Enum > size_t qHash(QFlags< Enum > flags, size_t seed=0) noexcept
template< typename Enum > bool operator==(Enum lhs, QFlags< Enum > rhs)
void * get() const noexcept
bool expectsGammaCorrectedBlending() const override
glyph_metrics_t boundingBox(const QGlyphLayout &glyphs) override
void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, QPainterPath *path, QTextItem::RenderFlags flags) override
Glyph * loadGlyph(uint glyph, const QFixedPoint &subPixelPosition, GlyphFormat format=Format_None, bool fetchMetricsOnly=false, bool disableOutlineDrawing=false) const
void setDefaultHintStyle(HintStyle style) override
HintStyle default_hint_style
glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, const QFixedPoint &subPixelPosition, const QTransform &matrix, QFontEngine::GlyphFormat format) override
int getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints) override
bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const override
void initializeHeightMetrics() const override
QGlyphSet * loadGlyphSet(const QTransform &matrix)
QFixed underlinePosition() const override
QFixed lineThickness() const override
QFixed emSquareSize() const override
bool initFromFontEngine(const QFontEngineFT *fontEngine)
QFontEngine * cloneWithSize(qreal pixelSize) const override
void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics) override
QImage alphaMapForGlyph(glyph_t g) override
QFontEngineFT(const QFontDef &fd)
bool isScalableBitmap() const
QFixed xHeight() const override
FT_Face non_locked_face() const
bool init(FaceId faceId, bool antiaalias, GlyphFormat defaultFormat=Format_None, const QByteArray &fontData=QByteArray())
void removeGlyphFromCache(glyph_t glyph) override
qreal maxCharWidth() const override
void doKerning(QGlyphLayout *, ShaperFlags) const override
void setQtDefaultHintStyle(QFont::HintingPreference hintingPreference)
Qt::HANDLE handle() const override
QFontEngine::Properties properties() const override
QFontEngine::FaceId faceId() const override
Glyph * loadGlyphFor(glyph_t g, const QFixedPoint &subPixelPosition, GlyphFormat format, const QTransform &t, bool fetchBoundingBox=false, bool disableOutlineDrawing=false)
int glyphCount() const override
static QFontEngineFT * create(const QFontDef &fontDef, FaceId faceId, const QByteArray &fontData=QByteArray())
bool isBitmapFont() const
Glyph * glyphData(glyph_t glyph, const QFixedPoint &subPixelPosition, GlyphFormat neededFormat, const QTransform &t) override
glyph_t glyphIndex(uint ucs4) const override
void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nglyphs, QPainterPath *path, QTextItem::RenderFlags flags) override
int synthesized() const override
QFixed capHeight() const override
QImage alphaRGBMapForGlyph(glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t) override
QImage bitmapForGlyph(glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t, const QColor &color) override
SubpixelAntialiasingType subpixelType
QFixed averageCharWidth() const override
bool getSfntTableData(uint tag, uchar *buffer, uint *length) const override
bool supportsTransformation(const QTransform &transform) const override
FT_Face lockFace(Scaling scale=Scaled) const
void recalcAdvances(QGlyphLayout *glyphs, ShaperFlags flags) const override
virtual QFixed descent() const
void loadKerningPairs(QFixed scalingFactor)
QFixed calculatedCapHeight() const
static QByteArray convertToPostscriptFontFamilyName(const QByteArray &fontFamily)
int m_subPixelPositionCount
virtual QFixed ascent() const
struct QFontEngine::FaceData faceData
virtual QImage alphaRGBMapForGlyph(glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t)
virtual QFixed averageCharWidth() const
virtual void initializeHeightMetrics() const
virtual void addOutlineToPath(qreal, qreal, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags flags)
virtual void doKerning(QGlyphLayout *, ShaperFlags) const
void getGlyphPositions(const QGlyphLayout &glyphs, const QTransform &matrix, QTextItem::RenderFlags flags, QVarLengthArray< glyph_t > &glyphs_out, QVarLengthArray< QFixedPoint > &positions)
virtual QFixed leading() const
void * harfbuzzFace() const
virtual QFixed xHeight() const
int getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints)
static int getFaceIndexByStyleName(const QString &faceFileName, const QString &styleName)
static void addBitmapToPath(FT_GlyphSlot slot, const QFixedPoint &point, QPainterPath *path)
static void addGlyphToPath(FT_Face face, FT_GlyphSlot g, const QFixedPoint &point, QPainterPath *path, FT_Fixed x_scale, FT_Fixed y_scale)
bool isScalableBitmap() const
glyph_t cmapCache[cmapCacheSize]
static QFreetypeFace * getFace(const QFontEngine::FaceId &face_id, const QByteArray &fontData=QByteArray())
void release(const QFontEngine::FaceId &face_id)
QFontEngine::Properties properties() const
void computeSize(const QFontDef &fontDef, int *xsize, int *ysize, bool *outline_drawing, QFixed *scalableBitmapScaleFactor)
bool getSfntTable(uint tag, uchar *buffer, uint *length) const
QScreen * primaryScreen
the primary (or default) screen of the application.
const_iterator cbegin() const noexcept
const_iterator constFind(const Key &key) const noexcept
const_iterator constEnd() const noexcept
iterator erase(const_iterator it)
T value(const Key &key) const noexcept
const_iterator cend() const noexcept
template< typename... T > size_t qHashMulti(size_t seed, const T &...args)
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
bool isEmpty() const noexcept
iterator insert(const Key &key, const T &value)
The QImage class provides a hardware-independent image representation that allows direct access to th...
QImage copy(const QRect &rect=QRect()) const
@ Format_ARGB32_Premultiplied
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
bool qFuzzyCompare(const QMatrix4x4 &m1, const QMatrix4x4 &m2)
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
The QPointF class defines a point in the plane using floating point precision.
constexpr qreal x() const noexcept
constexpr qreal y() const noexcept
The QRectF class defines a finite rectangle in the plane using floating point precision.
The QScopedValueRollback class resets a variable to its previous value on destruction.
The QScreen class is used to query screen properties. \inmodule QtGui.
QPlatformScreen * handle() const
The QString class provides a Unicode character string.
static QString fromLatin1(QByteArrayView ba)
static QString fromUtf8(QByteArrayView utf8)
QByteArray toUtf8() const &
The QThreadStorage class provides per-thread data storage.
static QUuid createUuid()
QByteArray toByteArray(StringFormat mode=WithBraces) const
QHash< QFontEngine::FaceId, QFreetypeFace * > faces
QHash< FaceStyle, int > faceIndices
qDeleteAll(list.begin(), list.end())
FT_Load_Glyph(FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags)
#define FT_LOAD_NO_BITMAP
FT_Set_Transform(FT_Face face, FT_Matrix *matrix, FT_Vector *delta)
#define FT_STYLE_FLAG_ITALIC
#define FT_LOAD_TARGET_MONO
FT_New_Face(FT_Library library, const char *filepathname, FT_Long face_index, FT_Face *aface)
#define FT_LOAD_TARGET_NORMAL
#define FT_FACE_FLAG_SCALABLE
FT_Done_Face(FT_Face face)
enum FT_Render_Mode_ FT_Render_Mode
#define FT_LOAD_NO_HINTING
FT_Get_Char_Index(FT_Face face, FT_ULong charcode)
#define FT_LOAD_FORCE_AUTOHINT
FT_Select_Size(FT_Face face, FT_Int strike_index)
#define FT_IS_SCALABLE(face)
#define FT_IS_FIXED_WIDTH(face)
FT_Get_Postscript_Name(FT_Face face)
struct FT_FaceRec_ * FT_Face
FT_Set_Charmap(FT_Face face, FT_CharMap charmap)
#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH
FT_Vector_Transform(FT_Vector *vector, const FT_Matrix *matrix)
FT_Render_Glyph(FT_GlyphSlot slot, FT_Render_Mode render_mode)
#define FT_HAS_COLOR(face)
FT_Done_FreeType(FT_Library library)
#define FT_STYLE_FLAG_BOLD
#define FT_LOAD_TARGET_LIGHT
FT_MulDiv(FT_Long a, FT_Long b, FT_Long c)
FT_Set_Char_Size(FT_Face face, FT_F26Dot6 char_width, FT_F26Dot6 char_height, FT_UInt horz_resolution, FT_UInt vert_resolution)
FT_New_Memory_Face(FT_Library library, const FT_Byte *file_base, FT_Long file_size, FT_Long face_index, FT_Face *aface)
FT_MulFix(FT_Long a, FT_Long b)
FT_Init_FreeType(FT_Library *alibrary)
FT_BEGIN_HEADER FT_Get_Font_Format(FT_Face face)
FT_Matrix_Multiply(const FT_Matrix *a, FT_Matrix *b)
FT_BEGIN_HEADER typedef signed long FT_Pos
FT_Library_SetLcdFilter(FT_Library library, FT_LcdFilter filter)
FT_BEGIN_HEADER enum FT_LcdFilter_ FT_LcdFilter
FT_Property_Get(FT_Library library, const FT_String *module_name, const FT_String *property_name, void *value)
FT_Property_Set(FT_Library library, const FT_String *module_name, const FT_String *property_name, const void *value)
FT_BEGIN_HEADER FT_GlyphSlot_Embolden(FT_GlyphSlot slot)
FT_GlyphSlot_Oblique(FT_GlyphSlot slot)
FT_BEGIN_HEADER typedef unsigned char FT_Bool
backing_store_ptr info
[4]
QTextStream & hex(QTextStream &stream)
png_structrp int png_fixed_point red
int qstrncmp(const char *str1, const char *str2, size_t len)
QList< QString > QStringList
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter * iter
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
constexpr T qbswap(T source)
int qRound(qfloat16 d) noexcept
void qt_addBitmapToPath(qreal x0, qreal y0, const uchar *image_data, int bpl, int w, int h, QPainterPath *path)
FT_Library qt_getFreetype()
QByteArray qt_fontdata_from_index(int)
#define QT_MAX_CACHED_GLYPH_SIZE
QtFreetypeData * qt_getFreetypeData()
QT_BEGIN_INCLUDE_NAMESPACE typedef unsigned char uchar
QT_END_INCLUDE_NAMESPACE typedef double qreal
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
GLenum GLuint GLenum GLsizei length
GLboolean GLboolean GLboolean b
GLenum GLsizeiptr const void GLsizei faceIndex
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble GLdouble top
GLenum GLenum GLsizei count
GLenum const void GLbitfield GLsizei numGlyphs
GLsizei GLenum const void GLuint GLsizei GLfloat * metrics
GLenum GLuint GLintptr offset
GLint GLsizei GLsizei GLenum format
GLenum GLsizeiptr const void * fontData
GLuint GLfloat GLfloat y0
GLfloat GLfloat GLfloat GLfloat h
GLuint GLenum GLenum transform
GLsizei const GLchar *const * path
GLenum GLenum GLenum GLenum GLenum scale
HB_EXTERN hb_font_get_glyph_func_t void * user_data
QFuture< QSet< QChar > > set
[10]
FT_Fixed linearHoriAdvance
constexpr int value() const
constexpr static QFixed fromReal(qreal r)
constexpr QFixed round() const
constexpr QFixed ceil() const
constexpr qreal toReal() const
constexpr static QFixed fromFixed(int fixed)
constexpr QPointF toPointF() const
qt_get_font_table_func_t get_font_table
QByteArray postscriptName
void setGlyph(glyph_t index, const QFixedPoint &spp, Glyph *glyph)
FT_Matrix transformationMatrix
void removeGlyphFromCache(glyph_t index, const QFixedPoint &subPixelPosition)
Glyph * getGlyph(glyph_t index, const QFixedPoint &subPixelPositionX=QFixedPoint()) const
QFixed effectiveAdvance(int item) const
QGlyphAttributes * attributes
FaceStyle(QString faceFileName, QString styleName)
FT_Get_PS_Font_Info(FT_Face face, PS_FontInfo afont_info)
FT_BEGIN_HEADER struct PS_FontInfoRec_ PS_FontInfoRec
FT_Get_Sfnt_Table(FT_Face face, FT_Sfnt_Tag tag)
FT_Load_Sfnt_Table(FT_Face face, FT_ULong tag, FT_Long offset, FT_Byte *buffer, FT_ULong *length)
XmlOutput::xml_output tag(const QString &name)