PythonQt.Qt.QGlyphRun
QGlyphRun
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
When Qt displays a string of text encoded in Unicode, it will first convert the Unicode points into a list of glyph indexes and a list of positions based on one or more fonts. The Unicode representation of the text and the QFont object will in this case serve as a convenient abstraction that hides the details of what actually takes place when displaying the text on-screen. For instance, by the time the text actually reaches the screen, it may be represented by a set of fonts in addition to the one specified by the user, e.g. in case the originally selected font did not support all the writing systems contained in the text.
Under certain circumstances, it can be useful as an application developer to have more low-level control over which glyphs in a specific font are drawn to the screen. This could for instance be the case in applications that use an external font engine and text shaper together with Qt. QGlyphRun provides an interface to the raw data needed to get text on the screen. It contains a list of glyph indexes, a position for each glyph and a font.
It is the user's responsibility to ensure that the selected font actually contains the provided glyph indexes.
QTextLayout::glyphRuns() or QTextFragment::glyphRuns() can be used to convert unicode encoded text into a list of QGlyphRun objects, and QPainter::drawGlyphRun() can be used to draw the glyphs.
Note: Please note that QRawFont is considered local to the thread in which it is constructed. This in turn means that a new QRawFont will have to be created and set on the QGlyphRun if it is moved to a different thread. If the QGlyphRun contains a reference to a QRawFont from a different thread than the current, it will not be possible to draw the glyphs using a QPainter, as the QRawFont is considered invalid and inaccessible in this case.
Source: https://doc.qt.io/archives/qt-5.15/qglyphrun.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
GlyphRunFlag |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
GlyphRunFlags |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
Overline |
attribute | Any |
(shared captured text) |
RightToLeft |
attribute | Any |
(shared captured text) |
SplitLigature |
attribute | Any |
(shared captured text) |
StrikeOut |
attribute | Any |
(shared captured text) |
Underline |
attribute | Any |
(shared captured text) |
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
boundingRect |
function | (self) -> Any |
X.boundingRect() -> PythonQt.QtCore.QRectF (shared captured text) |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
clear |
function | (self) -> Any |
Clears all data in the [QGlyphRun](https://doc.qt.io/archives/qt-5.15/qglyphrun.html) object. (shared captured text) |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
flags |
function | (self) -> Any |
Returns the flags set for this [QGlyphRun](https://doc.qt.io/archives/qt-5.15/qglyphrun.html). (shared captured text) |
glyphIndexes |
function | (self) -> tuple |
X.glyphIndexes() -> tuple (shared captured text) |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
inherits |
function | (self, *args: Any, **kwargs: Any) -> Any |
Returns if the class inherits or is of given type name (shared captured text) |
isEmpty |
function | (self) -> bool |
X.isEmpty() -> bool (shared captured text) |
isRightToLeft |
function | (self) -> bool |
X.isRightToLeft() -> bool (shared captured text) |
operator_assign |
function | (self, other: Any) -> Any |
X.operator_assign(other) -> PythonQt.QtGui.QGlyphRun (shared captured text) |
overline |
function | (self) -> bool |
X.overline() -> bool (shared captured text) |
positions |
function | (self) -> tuple |
X.positions() -> tuple (shared captured text) |
rawFont |
function | (self) -> Any |
X.rawFont() -> PythonQt.QtGui.QRawFont (shared captured text) |
setBoundingRect |
function | (self, boundingRect: Any) -> Any |
Sets the bounding rect of the glyphs in this [QGlyphRun](https://doc.qt.io/archives/qt-5.15/qglyphrun.html) to be boundingRect. (shared captured text) |
setFlag |
function | (self, arg0: flag, enabled: Any) -> Any |
X.setFlag(flag, enabled) (shared captured text) |
setFlags |
function | (self, arg0: flags) -> Any |
Sets the flags of this [QGlyphRun](https://doc.qt.io/archives/qt-5.15/qglyphrun.html) to flags. (shared captured text) |
setGlyphIndexes |
function | (self, glyphIndexes: Any) -> Any |
Set the glyph indexes for this [QGlyphRun](https://doc.qt.io/archives/qt-5.15/qglyphrun.html) object to glyphIndexes. (shared captured text) |
setOverline |
function | (self, overline: Any) -> Any |
Indicates that this [QGlyphRun](https://doc.qt.io/archives/qt-5.15/qglyphrun.html) should be painted with an overline decoration if overline is true. (shared captured text) |
setPositions |
function | (self, positions: Any) -> Any |
Sets the positions of the edge of the baseline for each glyph in this set of glyph indexes to positions. (shared captured text) |
setRawData |
function | (self, glyphIndexArray: Any, glyphPositionArray: Any, size: Any) -> Any |
X.setRawData(glyphIndexArray, glyphPositionArray, size) (shared captured text) |
setRawFont |
function | (self, rawFont: Any) -> Any |
Sets the font in which to look up the glyph indexes to the rawFont specified. (shared captured text) |
setRightToLeft |
function | (self, on: Any) -> Any |
Indicates that this [QGlyphRun](https://doc.qt.io/archives/qt-5.15/qglyphrun.html) contains glyphs that should be ordered from the right to left if rightToLeft is true. (shared captured text) |
setStrikeOut |
function | (self, strikeOut: Any) -> Any |
Indicates that this [QGlyphRun](https://doc.qt.io/archives/qt-5.15/qglyphrun.html) should be painted with an strike out decoration if strikeOut is true. (shared captured text) |
setUnderline |
function | (self, underline: Any) -> Any |
Indicates that this [QGlyphRun](https://doc.qt.io/archives/qt-5.15/qglyphrun.html) should be painted with an underline decoration if underline is true. (shared captured text) |
strikeOut |
function | (self) -> bool |
X.strikeOut() -> bool (shared captured text) |
swap |
function | (self, other: Any) -> Any |
Swaps this glyph run instance with other. (shared captured text) |
underline |
function | (self) -> bool |
X.underline() -> bool (shared captured text) |