16 int tabStops,
int *tabArray,
int tabArrayLen,
415 return engine->canRender(ucs4);
432 const int script =
ch.script();
447 engine->getGlyphBearings(glyph, &lb);
465 const int script =
ch.script();
480 engine->getGlyphBearings(glyph,
nullptr, &rb);
506 }
else if (
len < 0) {
574 const int script =
ch.script();
591 engine->recalcAdvances(&glyphs, { });
684 const int script =
ch.script();
761 while (tabArray[tabArrayLen])
767 tabArrayLen,
nullptr);
900 _text = _text.
mid(posA);
1128 return d ==
other.d;
1156 return engine->ascent().toReal();
1175 return engine->capHeight().toReal();
1193 return engine->descent().toReal();
1208 return (
engine->ascent() +
engine->descent()).toReal();
1222 return engine->leading().toReal();
1253 return engine->minLeftBearing();
1270 return engine->minRightBearing();
1280 return engine->maxCharWidth();
1293 return engine->xHeight().toReal();
1305 return engine->averageCharWidth().toReal();
1330 return engine->canRender(ucs4);
1347 const int script =
ch.script();
1362 engine->getGlyphBearings(glyph, &lb);
1380 const int script =
ch.script();
1395 engine->getGlyphBearings(glyph,
nullptr, &rb);
1490 const int script =
ch.script();
1507 engine->recalcAdvances(&glyphs, { });
1597 const int script =
ch.script();
1675 int tabStops,
int *tabArray)
const
1677 int tabArrayLen = 0;
1679 while (tabArray[tabArrayLen])
1684 tabArrayLen,
nullptr);
1820 _text = _text.
mid(posA);
1836 return engine->underlinePosition().toReal();
1871 return engine->lineThickness().toReal();
Script script() const noexcept
Category category() const noexcept
Returns the character's category.
T * data() const noexcept
Returns a pointer to the shared data object.
virtual QFixed ascent() const
\reentrant \inmodule QtGui
qreal height() const
Returns the height of the font.
~QFontMetricsF()
Destroys the font metrics object and frees all allocated resources.
qreal leading() const
Returns the leading of the font.
qreal ascent() const
Returns the ascent of the font.
QRectF boundingRect(const QString &string) const
Returns the bounding rectangle of the characters in the string specified by text.
qreal strikeOutPos() const
Returns the distance from the base line to where the strikeout line should be drawn.
qreal horizontalAdvance(const QString &string, int length=-1) const
Returns the horizontal advance in pixels of the first length characters of text.
qreal lineSpacing() const
Returns the distance from one base line to the next.
bool inFont(QChar) const
Returns true if character ch is a valid character in the font; otherwise returns false.
bool inFontUcs4(uint ucs4) const
Returns true if the character given by ch, encoded in UCS-4/UTF-32, is a valid character in the font;...
qreal averageCharWidth() const
QFontMetricsF & operator=(const QFontMetricsF &)
Assigns the font metrics fm to this font metrics object.
qreal descent() const
Returns the descent of the font.
qreal xHeight() const
Returns the 'x' height of the font.
qreal lineWidth() const
Returns the width of the underline and strikeout lines, adjusted for the point size of the font.
qreal capHeight() const
Returns the cap height of the font.
QSizeF size(int flags, const QString &str, int tabstops=0, int *tabarray=nullptr) const
Returns the size in pixels of the characters in the given text.
bool operator==(const QFontMetricsF &other) const
Returns true if the font metrics are equal to the other font metrics; otherwise returns false.
qreal underlinePos() const
Returns the distance from the base line to where an underscore should be drawn.
QRectF tightBoundingRect(const QString &text) const
qreal minRightBearing() const
Returns the minimum right bearing of the font.
qreal overlinePos() const
Returns the distance from the base line to where an overline should be drawn.
qreal leftBearing(QChar) const
Returns the left bearing of character ch in the font.
QString elidedText(const QString &text, Qt::TextElideMode mode, qreal width, int flags=0) const
qreal minLeftBearing() const
Returns the minimum left bearing of the font.
QFontMetricsF(const QFont &font)
Constructs a font metrics object for font.
qreal rightBearing(QChar) const
Returns the right bearing of character ch in the font.
qreal maxWidth() const
Returns the width of the widest character in the font.
\reentrant \inmodule QtGui
int height() const
Returns the height of the font.
QRect boundingRect(QChar) const
Returns the rectangle that is covered by ink if character ch were to be drawn at the origin of the co...
QSize size(int flags, const QString &str, int tabstops=0, int *tabarray=nullptr) const
Returns the size in pixels of text.
int descent() const
Returns the descent of the font.
int minLeftBearing() const
Returns the minimum left bearing of the font.
int rightBearing(QChar) const
Returns the right bearing of character ch in the font.
bool operator==(const QFontMetrics &other) const
Returns true if other is equal to this object; otherwise returns false.
int strikeOutPos() const
Returns the distance from the base line to where the strikeout line should be drawn.
int lineSpacing() const
Returns the distance from one base line to the next.
int capHeight() const
Returns the cap height of the font.
QString elidedText(const QString &text, Qt::TextElideMode mode, int width, int flags=0) const
int maxWidth() const
Returns the width of the widest character in the font.
int underlinePos() const
Returns the distance from the base line to where an underscore should be drawn.
bool inFont(QChar) const
Returns true if character ch is a valid character in the font; otherwise returns false.
int lineWidth() const
Returns the width of the underline and strikeout lines, adjusted for the point size of the font.
bool inFontUcs4(uint ucs4) const
Returns true if the character ucs4 encoded in UCS-4/UTF-32 is a valid character in the font; otherwis...
QRect tightBoundingRect(const QString &text) const
Returns a tight bounding rectangle around the characters in the string specified by text.
int horizontalAdvance(const QString &, int len=-1) const
Returns the horizontal advance in pixels of the first len characters of text.
int ascent() const
Returns the ascent of the font.
int averageCharWidth() const
QFontMetrics & operator=(const QFontMetrics &)
Assigns the font metrics fm.
int minRightBearing() const
Returns the minimum right bearing of the font.
int leading() const
Returns the leading of the font.
int xHeight() const
Returns the 'x' height of the font.
QFontMetrics(const QFont &)
Constructs a font metrics object for font.
int leftBearing(QChar) const
Returns the left bearing of character ch in the font.
int overlinePos() const
Returns the distance from the base line to where an overline should be drawn.
~QFontMetrics()
Destroys the font metrics object and frees all allocated resources.
QFontPrivate * smallCapsFontPrivate() const
QFontEngine * engineForScript(int script) const
void alterCharForCapitalization(QChar &c) const
The QPainter class performs low-level painting on widgets and other paint devices.
\inmodule QtCore\reentrant
QRect toAlignedRect() const noexcept
constexpr QSizeF size() const noexcept
Returns the size of the rectangle.
\inmodule QtCore\reentrant
constexpr QSize size() const noexcept
Returns the size of the rectangle.
constexpr QStringView left(qsizetype n) const noexcept
qsizetype indexOf(QChar c, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
\macro QT_RESTRICTED_CAST_FROM_ASCII
qsizetype size() const
Returns the number of characters in this string.
QString mid(qsizetype position, qsizetype n=-1) const
Returns a string that contains n characters of this string, starting at the specified position index.
static QString static QString qsizetype indexOf(QChar c, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Combined button and popup list for selecting options.
int qRound(qfloat16 d) noexcept
Q_GUI_EXPORT int qt_defaultDpi()
QT_BEGIN_NAMESPACE void qt_format_text(const QFont &font, const QRectF &_r, int tf, const QString &text, QRectF *brect, int tabStops, int *tabArray, int tabArrayLen, QPainter *painter)
static constexpr QLatin1Char s_variableLengthStringSeparator('\x9c')
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLenum GLsizei length
QT_BEGIN_NAMESPACE void qt_format_text(const QFont &fnt, const QRectF &_r, int tf, const QTextOption *opt, const QString &str, QRectF *brect, int tabstops, int *, int tabarraylen, QPainter *painter)
static constexpr QFixed fromReal(qreal r)
constexpr qreal toReal() const
\inmodule QtCore \reentrant