5#include <private/qfontengine_p.h>
6#include <private/qfontengineglyphcache_p.h>
7#include <private/qguiapplication_p.h>
9#include <qpa/qplatformfontdatabase.h>
10#include <qpa/qplatformintegration.h>
18#include <private/qstringiterator_p.h>
20#if QT_CONFIG(harfbuzz)
40 return a.m11() ==
b.m11()
43 &&
a.m22() ==
b.m22();
75#ifdef QT_BUILD_INTERNAL
81 delete enginesCollector;
89 delete enginesCollector;
90 enginesCollector =
nullptr;
98#define kBearingNotInitialized std::numeric_limits<qreal>::max()
104 m_heightMetricsQueried(
false),
119#ifdef QT_BUILD_INTERNAL
120 if (enginesCollector)
121 enginesCollector->
append(
this);
127#ifdef QT_BUILD_INTERNAL
128 if (enginesCollector)
137 int lw = score / 700;
140 if (lw < 2 && score >= 1050) lw = 2;
154#if QT_CONFIG(harfbuzz)
164#if QT_CONFIG(harfbuzz)
182#if QT_CONFIG(harfbuzz)
184 uint lenMort = 0, lenMorx = 0;
185 if (
getSfntTableData(
MAKE_TAG(
'm',
'o',
'r',
't'),
nullptr, &lenMort) ||
getSfntTableData(
MAKE_TAG(
'm',
'o',
'r',
'x'),
nullptr, &lenMorx))
189 unsigned int script_count = HB_OT_MAX_TAGS_PER_SCRIPT;
190 hb_tag_t script_tags[HB_OT_MAX_TAGS_PER_SCRIPT];
193 &script_count, script_tags,
196 if (hb_ot_layout_table_select_script(
face, HB_OT_TAG_GSUB, script_count, script_tags,
nullptr,
nullptr))
206 while (
it.hasNext()) {
273 int totalKashidas = 0;
301 glyphs_out[current] = glyphs.
glyphs[
i];
311 g.glyphs = &kashidaGlyph;
312 g.advances = &kashidaWidth;
316 xpos -= kashidaWidth;
328 glyphs_out[current] = kashidaGlyph;
345 glyphs_out[current] = glyphs.
glyphs[
i];
360 glyphs_out[current] = glyphs.
glyphs[
i];
369 glyphs_out.
resize(current);
376 if (leftBearing !=
nullptr)
378 if (rightBearing !=
nullptr)
385 if (hhea.
size() >= 10) {
409 bool hasEmbeddedBitmaps =
413 if (!hasEmbeddedBitmaps) {
433 if (os2.
size() >= 78) {
435 quint16 fsSelection = qFromBigEndian<quint16>(
ptr + 62);
436 qint16 typoAscent = qFromBigEndian<qint16>(
ptr + 68);
437 qint16 typoDescent = qFromBigEndian<qint16>(
ptr + 70);
438 qint16 typoLineGap = qFromBigEndian<qint16>(
ptr + 72);
439 quint16 winAscent = qFromBigEndian<quint16>(
ptr + 74);
440 quint16 winDescent = qFromBigEndian<quint16>(
ptr + 76);
442 enum { USE_TYPO_METRICS = 0x80 };
444 if (fsSelection & USE_TYPO_METRICS) {
446 if (typoAscent == 0 && typoDescent == 0)
453 if (winAscent == 0 && winDescent == 0)
495 return m_minLeftBearing;
498#define q16Dot16ToFloat(i) ((i) / 65536.0)
500#define kMinLeftSideBearingOffset 12
501#define kMinRightSideBearingOffset 14
526 static const int largestValidBearing = 4 * unitsPerEm;
528 if (
qAbs(minLeftSideBearing) < largestValidBearing)
529 m_minLeftBearing = minLeftSideBearing * funitToPixelFactor;
530 if (
qAbs(minRightSideBearing) < largestValidBearing)
531 m_minRightBearing = minRightSideBearing * funitToPixelFactor;
540 static const ushort characterSubset[] = {
541 '(',
'C',
'F',
'K',
'V',
'X',
'Y',
']',
'_',
'f',
'r',
'|',
542 127, 205, 645, 884, 922, 1070, 12386
546 m_minLeftBearing = m_minRightBearing = std::numeric_limits<qreal>::max();
548 for (
uint i = 0;
i < (
sizeof(characterSubset) /
sizeof(
ushort)); ++
i) {
565 qWarning() <<
"Failed to compute left/right minimum bearings for"
569 return m_minRightBearing;
595 overall.
x =
qMin(overall.
x,
x);
596 overall.
y =
qMin(overall.
y,
y);
603 overall.
width = xmax - overall.
x;
610 QTextItem::RenderFlags
flags)
622#define GRID(x, y) grid[(y)*(w+1) + (x)]
623#define SET(x, y) (*(image_data + (y)*bpl + ((x) >> 3)) & (0x80 >> ((x) & 7)))
674 path->closeSubpath();
681 for (
int y = 0;
y <=
h; ++
y) {
682 for (
int x = 0;
x <=
w; ++
x) {
683 bool topLeft = (
x == 0 ||
y == 0) ?
false :
SET(
x - 1,
y - 1);
684 bool topRight = (
x ==
w ||
y == 0) ?
false :
SET(
x,
y - 1);
685 bool bottomLeft = (
x == 0 ||
y ==
h) ?
false :
SET(
x - 1,
y);
686 bool bottomRight = (
x ==
w ||
y ==
h) ?
false :
SET(
x,
y);
689 if ((!topRight) & bottomRight)
691 if ((!bottomRight) & bottomLeft)
693 if ((!bottomLeft) & topLeft)
695 if ((!topLeft) & topRight)
701 for (
int y = 0;
y <
h; ++
y) {
702 for (
int x = 0;
x <
w; ++
x) {
731 const int w = alphaMask.
width();
732 const int h = alphaMask.
height();
735 if (alphaMask.
depth() == 1) {
743 for (
int yi = 0; yi <
h; ++yi) {
745 uchar *
dst = bitmapData + yi*destBpl;
746 for (
int xi = 0; xi <
w; ++xi) {
747 const int byte = xi / 8;
748 const int bit = xi % 8;
752 dst[byte] |= 128 >> bit;
772 for (
int i = 0;
i < nGlyphs - 1; ++
i) {
773 g.glyphs[
i] = glyphs[
i];
776 g.glyphs[nGlyphs - 1] = glyphs[nGlyphs - 1];
816 for (
int y=0;
y<alphaMask.
height(); ++
y) {
819 for (
int x=0;
x<alphaMask.
width(); ++
x) {
868 int glyph_width =
qCeil((gm.
x + gm.
width).toReal()) - glyph_x;
869 int glyph_height =
qCeil((gm.
y + gm.
height).toReal()) - glyph_y;
871 if (glyph_width <= 0 || glyph_height <= 0)
913 p.emSquare =
p.ascent;
916 p.capHeight =
p.ascent;
972 if (
cache ==
e.cache.data())
981 GlyphCacheEntry
entry;
1016 if (pairs[middle].left_right == left_right)
1017 return pairs[middle].
adjust;
1019 if (pairs[middle].left_right < left_right)
1070 for(
int i = 0;
i < numTables; ++
i) {
1086 if (version == 0 && coverage == 0x0001) {
1097 if (nPairs * 6 + 8 >
length - 6) {
1104 for(
int i = 0;
i < nPairs; ++
i) {
1111 p.left_right =
uint(tmp) << 16;
1115 p.left_right |= tmp;
1120 p.adjust =
QFixed(
int(
short(tmp))) / scalingFactor;
1138 if (maxpTable.
size() < 6)
1177 MicrosoftUnicodeExtended
1180 int symbolTable = -1;
1181 int tableToUse = -1;
1183 for (
int n = 0;
n < numTables; ++
n) {
1188 quint16 platformSpecificId = 0;
1192 switch (platformId) {
1194 if (score < Unicode &&
1195 (platformSpecificId == 0 ||
1196 platformSpecificId == 2 ||
1197 platformSpecificId == 3)) {
1200 }
else if (score < Unicode11 && platformSpecificId == 1) {
1206 if (score < AppleRoman && platformSpecificId == 0) {
1212 switch (platformSpecificId) {
1221 if (score < MicrosoftUnicode) {
1223 score = MicrosoftUnicode;
1227 if (score < MicrosoftUnicodeExtended) {
1229 score = MicrosoftUnicodeExtended;
1243 *isSymbolFont = (symbolTable > -1);
1277 if (symbolTable > -1 && ((score == Unicode) || (score == Unicode11))) {
1278 const uchar *selectedTable =
table + unicode_table;
1281 bool unicodeTableHasLatin1 =
false;
1282 for (
int uc=0x00; uc<0x100; ++uc) {
1284 unicodeTableHasLatin1 =
true;
1290 bool unicodeTableHasSymbols =
false;
1291 if (!unicodeTableHasLatin1) {
1292 for (
int uc=0xf000; uc<0xf100; ++uc) {
1294 unicodeTableHasSymbols =
true;
1301 if (!unicodeTableHasLatin1 && unicodeTableHasSymbols) {
1302 tableToUse = symbolTable;
1308 return table + unicode_table;
1313 const uchar *
end = cmap + cmapSize;
1319 const uchar *
ptr = cmap + 6 + unicode;
1320 if (unicode < 256 &&
ptr <
end)
1322 }
else if (
format == 4) {
1328 if (unicode >= 0xffff)
1335 const unsigned char *ends = cmap + 14;
1338 for (;
i < segCountX2/2; ++
i) {
1342 if (codePoint >= unicode)
1346 const unsigned char *idx = ends + segCountX2 + 2 + 2*
i;
1351 if (startIndex > unicode)
1368 if (idRangeoffset_t) {
1381 }
else if (
format == 6) {
1389 if (unicode < firstCode6)
1395 if (entryCount6 * 2 + 10 > tableSize)
1398 quint16 sentinel6 = firstCode6 + entryCount6;
1399 if (unicode >= sentinel6)
1402 quint16 entryIndex6 = unicode - firstCode6;
1407 }
else if (
format == 12) {
1422 if (unicode < startCharCode)
1429 if (unicode <= endCharCode) {
1434 return index + unicode - startCharCode;
1440 qDebug(
"cmap table of format %d not implemented",
format);
1495QFontEngine::GlyphCacheEntry::GlyphCacheEntry()
1499QFontEngine::GlyphCacheEntry::GlyphCacheEntry(
const GlyphCacheEntry &
o)
1504QFontEngine::GlyphCacheEntry::~GlyphCacheEntry()
1508QFontEngine::GlyphCacheEntry &QFontEngine::GlyphCacheEntry::operator=(
const GlyphCacheEntry &
o)
1545 if (*nglyphs <
len) {
1552 while (
it.hasNext()) {
1554 glyphs->
glyphs[ucs4Length++] = 1;
1557 *nglyphs = ucs4Length;
1582 QSize s(_size - 3, _size - 3);
1583 for (
int k = 0; k <
positions.size(); k++)
1602 QSize s(_size - 3, _size - 3);
1608 if (glyphs.
size() == 0)
1618 for (
int k = 0; k <
positions.size(); k++)
1671 for (
int i=2;
i <= _size-3; ++
i) {
1673 bits[
i + (_size - 3) *
image.bytesPerLine()] = 255;
1675 bits[_size - 3 +
i *
image.bytesPerLine()] = 255;
1685{
return glyph >> 24; }
1689{
return glyph & 0x00ffffff; }
1693 m_fallbackFamilies(fallbackFamilies),
1695 m_fallbackFamiliesQueried(!m_fallbackFamilies.isEmpty())
1699 if (m_fallbackFamilies.isEmpty()) {
1701 m_fallbackFamilies <<
QString();
1704 m_engines.
resize(m_fallbackFamilies.size() + 1);
1715 for (
int i = 0;
i < m_engines.
size(); ++
i) {
1717 if (fontEngine && !fontEngine->
ref.
deref())
1737 Q_ASSERT(!m_fallbackFamiliesQueried);
1739 m_fallbackFamilies = fallbackFamilies;
1740 if (m_fallbackFamilies.isEmpty()) {
1748 m_engines.
resize(m_fallbackFamilies.size() + 1);
1751 m_fallbackFamiliesQueried =
true;
1756 if (!m_fallbackFamiliesQueried &&
at > 0)
1759 if (!m_engines.
at(
at)) {
1798 if (!m_fallbackFamiliesQueried)
1800 for (
int x = 1,
n =
qMin(m_engines.
size(), 256);
x <
n; ++
x) {
1812 glyph =
engine->glyphIndex(ucs4);
1826 QFontEngine::ShaperFlags
flags)
const
1834 int lastFallback = -1;
1835 char32_t previousUcs4 = 0;
1836 while (
it.hasNext()) {
1837 const char32_t ucs4 =
it.peekNext();
1842 if (lastFallback >= 0 && (ucs4 == 0x200d || ucs4 == 0x200c)) {
1846 glyphs->
glyphs[glyph_pos] = glyph;
1853 glyphs->
glyphs[glyph_pos] |= (lastFallback << 24);
1861 if (glyphs->
glyphs[glyph_pos] == 0
1868 if (!m_fallbackFamiliesQueried)
1870 for (
int x = 1,
n =
qMin(m_engines.
size(), 256);
x <
n; ++
x) {
1886 glyphs->
glyphs[glyph_pos] = glyph;
1895 glyphs->
glyphs[glyph_pos] |= (
x << 24);
1903 const int variantSelectorBlock = 0xFE00;
1904 if ((ucs4 & 0xFFF0) == variantSelectorBlock && glyph_pos > 0) {
1905 int selectorFontEngine = glyphs->
glyphs[glyph_pos] >> 24;
1906 int precedingCharacterFontEngine = glyphs->
glyphs[glyph_pos - 1] >> 24;
1908 if (selectorFontEngine != precedingCharacterFontEngine) {
1912 glyphs->
glyphs[glyph_pos - 1] = glyph;
1919 glyphs->
glyphs[glyph_pos - 1] |= (selectorFontEngine << 24);
1927 previousUcs4 = ucs4;
1930 *nglyphs = glyph_pos;
1965 overall.
x =
qMin(overall.
x, gm.
x);
1966 overall.
y =
qMin(overall.
y, gm.
y);
1974 const int hi = which << 24;
1990 overall.
x =
qMin(overall.
x, gm.
x);
1991 overall.
y =
qMin(overall.
y, gm.
y);
1999 const int hi = which << 24;
2010 engine(which)->getGlyphBearings(
stripped(glyph), leftBearing, rightBearing);
2023 for (
int gl = 0; gl < glyphs.
numGlyphs; gl++)
2041 const int hi = which << 24;
2067 const int hi = which << 24;
2093 const int hi = which << 24;
2110 const int hi = which << 24;
2136 const int hi = which << 24;
2153 const int hi = which << 24;
2165{
return engine(0)->ascent(); }
2168{
return engine(0)->capHeight(); }
2171{
return engine(0)->descent(); }
2175 return engine(0)->leading();
2180 return engine(0)->xHeight();
2185 return engine(0)->averageCharWidth();
2190 return engine(0)->lineThickness();
2195 return engine(0)->underlinePosition();
2200 return engine(0)->maxCharWidth();
2205 return engine(0)->minLeftBearing();
2210 return engine(0)->minRightBearing();
2223 g.numGlyphs = nglyphs;
2224 g.glyphs = glyphs.
data();
2228 for (
int i = 0;
i < nglyphs;
i++) {
2248 return engine(which)->alphaMapForGlyph(
stripped(glyph), subPixelPosition);
2262 return engine(which)->alphaMapForGlyph(
stripped(glyph), subPixelPosition,
t);
2270 return engine(which)->alphaRGBMapForGlyph(
stripped(glyph), subPixelPosition,
t);
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
bool isEmpty() const noexcept
Returns true if the byte array has size 0; otherwise returns false.
static QByteArray number(int, int base=10)
Returns a byte-array representing the whole number n as text.
QByteArray & replace(qsizetype index, qsizetype len, const char *s, qsizetype alen)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Category category() const noexcept
Returns the character's category.
The QColor class provides colors based on RGB, HSV or CMYK values.
static QFontCache * instance()
void updateHitCountAndTimeStamp(Engine &value)
void insertEngine(const Key &key, QFontEngine *engine, bool insertMulti=false)
static QFontEngine * findFont(const QFontDef &request, int script, bool preferScriptOverFamily=false)
void draw(QPaintEngine *p, qreal x, qreal y, const QTextItemInt &si)
virtual QImage alphaMapForGlyph(glyph_t) override
virtual qreal maxCharWidth() const override
virtual QFontEngine * cloneWithSize(qreal pixelSize) const override
virtual QFixed leading() const override
virtual bool canRender(const QChar *string, int len) const override
virtual glyph_t glyphIndex(uint ucs4) const override
virtual QFixed descent() const override
virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const override
virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const override
virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs) override
virtual void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, QPainterPath *path, QTextItem::RenderFlags flags) override
virtual QFixed ascent() const override
virtual QFixed capHeight() const override
void ensureEngineAt(int at)
virtual glyph_t glyphIndex(uint ucs4) const override
virtual bool shouldLoadFontEngineForCharacter(int at, uint ucs4) const
virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const override
virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const override
virtual QFixed ascent() const override
virtual QFixed capHeight() const override
QString fallbackFamilyAt(int at) const
virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs) override
virtual QFixed descent() const override
virtual QFixed leading() const override
virtual QFixed lineThickness() const override
virtual bool canRender(const QChar *string, int len) const override
virtual qreal maxCharWidth() const override
virtual QFixed xHeight() const override
static QFontEngine * createMultiFontEngine(QFontEngine *fe, int script)
virtual void ensureFallbackFamiliesQueried()
virtual void addOutlineToPath(qreal, qreal, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags flags) override
virtual qreal minLeftBearing() const override
QFontEngine * engine(int at) const
virtual void doKerning(QGlyphLayout *, ShaperFlags) const override
void setFallbackFamiliesList(const QStringList &fallbackFamilies)
virtual qreal minRightBearing() const override
virtual QFixed underlinePosition() const override
virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing=nullptr, qreal *rightBearing=nullptr) override
virtual QImage alphaMapForGlyph(glyph_t) override
QFontEngineMulti(QFontEngine *engine, int script, const QStringList &fallbackFamilies=QStringList())
virtual QFontEngine * loadEngine(int at)
virtual QFixed averageCharWidth() const override
static uchar highByte(glyph_t glyph)
virtual QImage alphaRGBMapForGlyph(glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t) override
glyph_metrics_t tightBoundingBox(const QGlyphLayout &glyphs)
virtual bool supportsHorizontalSubPixelPositions() const
virtual QFixed descent() const
void setGlyphCache(const void *key, QFontEngineGlyphCache *data)
virtual int getPointInOutline(glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints)
virtual Properties properties() const
void loadKerningPairs(QFixed scalingFactor)
QFixed calculatedCapHeight() const
static const uchar * getCMap(const uchar *table, uint tableSize, bool *isSymbolFont, int *cmapSize)
virtual int glyphCount() const
virtual QImage bitmapForGlyph(glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t, const QColor &color=QColor())
virtual Qt::HANDLE handle() const
virtual qreal minRightBearing() const
static QByteArray convertToPostscriptFontFamilyName(const QByteArray &fontFamily)
virtual bool expectsGammaCorrectedBlending() const
int m_subPixelPositionCount
virtual qreal minLeftBearing() const
bool m_heightMetricsQueried
virtual void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nglyphs, QPainterPath *path, QTextItem::RenderFlags flags)
virtual FaceId faceId() const
virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing=nullptr, qreal *rightBearing=nullptr)
virtual Glyph * glyphData(glyph_t glyph, const QFixedPoint &subPixelPosition, GlyphFormat neededFormat, const QTransform &t)
bool supportsScript(QChar::Script script) const
virtual qreal maxCharWidth() const =0
virtual void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics)
void * harfbuzzFont() const
virtual QFixed ascent() const
bool canRender(uint ucs4) const
virtual QImage alphaMapForGlyph(glyph_t)
QFixed firstLeftBearing(const QGlyphLayout &glyphs)
struct QFontEngine::FaceData faceData
virtual QImage alphaRGBMapForGlyph(glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t)
QByteArray getSfntTable(uint tag) const
virtual QFixed averageCharWidth() const
virtual void removeGlyphFromCache(glyph_t)
virtual void initializeHeightMetrics() const
virtual void addOutlineToPath(qreal, qreal, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags flags)
virtual bool supportsVerticalSubPixelPositions() const
static bool scriptRequiresOpenType(QChar::Script script)
bool processOS2Table() const
virtual void doKerning(QGlyphLayout *, ShaperFlags) const
bool processHheaTable() const
void getGlyphPositions(const QGlyphLayout &glyphs, const QTransform &matrix, QTextItem::RenderFlags flags, QVarLengthArray< glyph_t > &glyphs_out, QVarLengthArray< QFixedPoint > &positions)
void clearGlyphCache(const void *key)
virtual glyph_t glyphIndex(uint ucs4) const =0
virtual QFixed lineThickness() const
virtual QFixed underlinePosition() const
void addBitmapFontToPath(qreal x, qreal y, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags)
virtual bool getSfntTableData(uint tag, uchar *buffer, uint *length) const
Returns true if the font table idetified by tag exists in the font; returns false otherwise.
virtual bool supportsTransformation(const QTransform &transform) const
bool supportsSubPixelPositions() const
static quint32 getTrueTypeGlyphIndex(const uchar *cmap, int cmapSize, uint unicode)
virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs)
QFixed lastRightBearing(const QGlyphLayout &glyphs)
virtual void recalcAdvances(QGlyphLayout *, ShaperFlags) const
QList< KernPair > kerning_pairs
QFontEngineGlyphCache * glyphCache(const void *key, GlyphFormat format, const QTransform &transform, const QColor &color=QColor()) const
virtual QFixed leading() const
void * harfbuzzFace() const
virtual bool hasUnreliableGlyphOutline() const
virtual QFixed xHeight() const
virtual QFixed emSquareSize() const
virtual QFixedPoint subPixelPositionFor(const QFixedPoint &position) const
StyleHint
Style hints are used by the \l{QFont}{font matching} algorithm to find an appropriate default family ...
Style
This enum describes the different styles of glyphs that are used to display text.
static QPlatformIntegration * platformIntegration()
static QGuiApplicationPrivate * instance()
bool remove(const Key &key)
Removes the item that has the key from the hash.
const_iterator constFind(const Key &key) const noexcept
const_iterator cend() const noexcept
qsizetype bytesPerLine() const
Returns the number of bytes per image scanline.
uchar * scanLine(int)
Returns a pointer to the pixel data at the scanline with index i.
int width() const
Returns the width of the image.
uchar * bits()
Returns a pointer to the first pixel data.
int height() const
Returns the height of the image.
@ Format_ARGB32_Premultiplied
void fill(uint pixel)
Fills the entire image with the given pixelValue.
const uchar * constScanLine(int) const
Returns a pointer to the pixel data at the scanline with index i.
qsizetype size() const noexcept
bool removeOne(const AT &t)
const_reference at(qsizetype i) const noexcept
void resize(qsizetype size)
void append(parameter_type t)
iterator find(const Key &key)
The QPainter class performs low-level painting on widgets and other paint devices.
const QPen & pen() const
Returns the painter's current pen.
void drawRect(const QRectF &rect)
Draws the current rectangle with the current pen and brush.
void setPen(const QColor &color)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void restore()
Restores the current painter state (pops a saved state off the stack).
void save()
Saves the current painter state (pushes the state onto a stack).
void setBrush(const QBrush &brush)
Sets the painter's brush to the given brush.
void setWidthF(qreal width)
Sets the pen width to the given width in pixels with floating point precision.
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
QTestFontEngine(int size)
constexpr size_type size() const noexcept
void resize(qsizetype sz)
QCache< int, Employee > cache
[0]
QSet< QString >::iterator it
Combined button and popup list for selecting options.
AudioChannelLayoutTag tag
static const QCssKnownValue positions[NumKnownPositionModes - 1]
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void * user_data
static QString header(const QString &name)
int qRound(qfloat16 d) noexcept
QStringList qt_fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script)
static bool qt_get_font_table_default(void *user_data, uint tag, uchar *buffer, uint *length)
static bool qSafeFromBigEndian(const uchar *source, const uchar *end, T *output)
static QT_BEGIN_NAMESPACE bool qtransform_equals_no_translate(const QTransform &a, const QTransform &b)
static QFixed kerning(int left, int right, const QFontEngine::KernPair *pairs, int numPairs)
static void collectSingleContour(qreal x0, qreal y0, uint *grid, int x, int y, int w, int h, QPainterPath *path)
QStringList qt_fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script)
static glyph_t stripped(glyph_t glyph)
Q_GUI_EXPORT void qt_addBitmapToPath(qreal x0, qreal y0, const uchar *image_data, int bpl, int w, int h, QPainterPath *path)
#define kBearingNotInitialized
#define kMinLeftSideBearingOffset
#define q16Dot16ToFloat(i)
#define kMinRightSideBearingOffset
void qt_addBitmapToPath(qreal x0, qreal y0, const uchar *image_data, int bpl, int w, int h, QPainterPath *path)
#define MAKE_TAG(ch1, ch2, ch3, ch4)
hb_script_t hb_qt_script_to_script(QChar::Script script)
hb_font_t * hb_qt_font_get_for_engine(QFontEngine *fe)
hb_face_t * hb_qt_face_get_for_engine(QFontEngine *fe)
struct hb_face_t hb_face_t
static ControlElement< T > * ptr(QWidget *widget)
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qMax(const T &a, const T &b)
constexpr T qAbs(const T &t)
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei count
GLsizei GLenum const void GLuint GLsizei GLfloat * metrics
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLint GLsizei GLsizei GLenum format
GLuint GLfloat GLfloat y0
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLsizei GLchar * source
GLuint GLenum GLenum transform
GLsizei GLfixed GLfixed GLfixed GLfixed const GLubyte * bitmap
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const void * bits
GLsizei const GLchar *const * path
GLenum GLenum GLsizei void * table
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
constexpr QRgb qRgb(int r, int g, int b)
constexpr int qAlpha(QRgb rgb)
#define Q_AUTOTEST_EXPORT
QT_BEGIN_NAMESPACE typedef uchar * output
QNetworkRequest request(url)
static constexpr QFixed fromReal(qreal r)
static constexpr QFixed fromFixed(int fixed)
constexpr int toInt() const
constexpr QFixed round() const
constexpr QFixed ceil() const
constexpr qreal toReal() const
qt_get_font_table_func_t get_font_table
QGlyphJustification * justifications
QFixed effectiveAdvance(int item) const
QGlyphAttributes * attributes
QGlyphLayout mid(int position, int n=-1) const
QFixed rightBearing() const
QFixed leftBearing() const
QThreadStorage< QCache< QString, SomeClass > > caches
[7]