Name Description Size Coverage
coretext -
freetype -
LICENSE.AGLFN.txt 1425 -
qabstracttextdocumentlayout.cpp ! \class QAbstractTextDocumentLayout \reentrant \brief The QAbstractTextDocumentLayout class is an abstract base class used to implement custom layouts for QTextDocuments. \inmodule QtGui \ingroup richtext-processing The standard layout provided by Qt can handle simple word processing including inline images, lists and tables. Some applications, e.g., a word processor or a DTP application might need more features than the ones provided by Qt's layout engine, in which case you can subclass QAbstractTextDocumentLayout to provide custom layout behavior for your text documents. An instance of the QAbstractTextDocumentLayout subclass can be installed on a QTextDocument object with the \l{QTextDocument::}{setDocumentLayout()} function. You can insert custom objects into a QTextDocument; see the QTextObjectInterface class description for details. \sa QTextObjectInterface 23422 -
qabstracttextdocumentlayout.h 3854 -
qabstracttextdocumentlayout_p.h 1962 -
qcolrpaintgraphrenderer.cpp 10550 -
qcolrpaintgraphrenderer_p.h 2458 -
qcssparser.cpp nothing 102708 -
qcssparser_p.h namespace QCss 25630 -
qcssscanner.cpp 37099 -
qdistancefield.cpp 41342 -
qdistancefield_p.h 3135 -
qfont.cpp QFontDef comparison is more complicated than just simple per-member comparisons. When comparing point/pixel sizes, either point or pixelsize could be -1. in This case we have to compare the non negative size value. This test will fail if the point-sizes differ by 1/2 point or more or they do not round to the same value. We have to do this since our API still uses 'int' point-sizes in the API, but store deci-point-sizes internally. To compare the family members, we need to parse the font names and compare the family/foundry strings separately. This allows us to compare e.g. "Helvetica" and "Helvetica [Adobe]" with positive results. 120938 -
qfont.h don't touch 11752 -
qfont_p.h 9717 -
qfontdatabase.cpp 107230 -
qfontdatabase.h 3963 -
qfontdatabase_p.h 8486 -
qfontengine.cpp 88647 -
qfontengine_p.h Used with the Freetype font engine. 19252 -
qfontengineglyphcache.cpp 344 -
qfontengineglyphcache_p.h 1504 -
qfontinfo.h 1443 -
qfontmetrics.cpp QFontMetrics member functions *************************************************************************** 59224 -
qfontmetrics.h 5119 -
qfontsubset.cpp 42065 -
qfontsubset_agl.cpp This file is autogenerated from the Adobe Glyph List database v1.7. Do not edit 17363 -
qfontsubset_p.h 1543 -
qfontvariableaxis.cpp ! \class QFontVariableAxis \reentrant \inmodule QtGui \ingroup shared \since 6.9 \brief The QFontVariableAxis class represents a variable axis in a font. Variable fonts provide a way to store multiple variations (with different weights, widths or styles) in the same font file. The variations are given as floating point values for a pre-defined set of parameters, called "variable axes". Specific parameterizations (sets of values for the axes in a font) can be selected using the properties in QFont, same as with traditional subfamilies that are defined as stand-alone font files. But with variable fonts, arbitrary values can be provided for each axis to gain a fine-grained customization of the font's appearance. QFontVariableAxis contains information of one axis. Use \l{QFontInfo::variableAxes()} to retrieve a list of the variable axes defined for a given font. Specific values can be provided for an axis by using \l{QFont::setVariableAxis()} and passing in the \l{tag()}. \note On Windows, variable axes are not supported if the optional GDI font backend is in use. 7552 -
qfontvariableaxis.h 2129 -
qfragmentmap.cpp 206 -
qfragmentmap_p.h 23840 -
qglyphrun.cpp ! \class QGlyphRun \brief The QGlyphRun class provides direct access to the internal glyphs in a font. \since 4.8 \inmodule QtGui \ingroup text \ingroup shared 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. 16910 -
qglyphrun.h 2579 -
qglyphrun_p.h 2174 -
qharfbuzzng.cpp 21299 -
qharfbuzzng_p.h 1424 -
qinputcontrol.cpp ! \internal Creates a wrapper for returning QMimeData in response to Qt::ImCurrentSelection, while being backwards compatible with clients who only read the plain text string. 4644 -
qinputcontrol_p.h 1238 -
qplatformfontdatabase.cpp ! Registers a font with the given set of attributes describing the font's foundry, family name, style and stretch information, pixel size, and supported writing systems. Additional information about whether the font can be scaled and antialiased can also be provided. The foundry name and font family are described by \a foundryName and \a familyName. The font weight (light, normal, bold, etc.), style (normal, oblique, italic) and stretch information (condensed, expanded, unstretched, etc.) are specified by \a weight, \a style and \a stretch. Some fonts can be antialiased and scaled; \a scalable and \a antialiased can be set to true for fonts with these attributes. The intended pixel size of non-scalable fonts is specified by \a pixelSize; this value will be ignored for scalable fonts. The writing systems supported by the font are specified by the \a writingSystems argument. \sa registerFontFamily() 21695 -
qplatformfontdatabase.h 4424 -
qrawfont.cpp ! \class QRawFont \brief The QRawFont class provides access to a single physical instance of a font. \since 4.8 \inmodule QtGui \ingroup text \ingroup shared \note QRawFont is a low level class. For most purposes QFont is a more appropriate class. Most commonly, when presenting text in a user interface, the exact fonts used to render the characters is to some extent unknown. This can be the case for several reasons: For instance, the actual, physical fonts present on the target system could be unexpected to the developers, or the text could contain user selected styles, sizes or writing systems that are not supported by font chosen in the code. Therefore, Qt's QFont class really represents a query for fonts. When text is interpreted, Qt will do its best to match the text to the query, but depending on the support, different fonts can be used behind the scenes. For most use cases, this is both expected and necessary, as it minimizes the possibility of text in the user interface being undisplayable. In some cases, however, more direct control over the process might be useful. It is for these use cases the QRawFont class exists. A QRawFont object represents a single, physical instance of a given font in a given pixel size. I.e. in the typical case it represents a set of TrueType or OpenType font tables and uses a user specified pixel size to convert metrics into logical pixel units. It can be used in combination with the QGlyphRun class to draw specific glyph indexes at specific positions, and also have accessors to some relevant data in the physical font. QRawFont only provides support for the main font technologies: GDI and DirectWrite on Windows platforms, FreeType on Linux platforms and CoreText on \macos. For other font back-ends, the APIs will be disabled. QRawFont can be constructed in a number of ways: \list \li It can be constructed by calling QTextLayout::glyphs() or QTextFragment::glyphs(). The returned QGlyphs objects will contain QRawFont objects which represent the actual fonts used to render each portion of the text. \li It can be constructed by passing a QFont object to QRawFont::fromFont(). The function will return a QRawFont object representing the font that will be selected as response to the QFont query and the selected writing system. \li It can be constructed by passing a file name or QByteArray directly to the QRawFont constructor, or by calling loadFromFile() or loadFromData(). In this case, the font will not be registered in QFontDatabase, and it will not be available as part of regular font selection. \endlist QRawFont is considered local to the thread in which it is constructed (either using a constructor, or by calling loadFromData() or loadFromFile()). The QRawFont cannot be moved to a different thread, but will have to be recreated in the thread in question. \note For the requirement of caching glyph indexes and font selections for static text to avoid reshaping and relayouting in the inner loop of an application, a better choice is the QStaticText class, since it optimizes the memory cost of the cache and also provides the possibility of paint engine specific caches for an additional speed-up. 28473 -
qrawfont.h 4446 -
qrawfont_p.h 2767 -
qstatictext.cpp ! \class QStaticText \brief The QStaticText class enables optimized drawing of text when the text and its layout is updated rarely. \since 4.7 \inmodule QtGui \ingroup multimedia \ingroup text \ingroup shared QStaticText provides a way to cache layout data for a block of text so that it can be drawn more efficiently than by using QPainter::drawText() in which the layout information is recalculated with every call. The class primarily provides an optimization for cases where the text, its font and the transformations on the painter are static over several paint events. If the text or its layout is changed for every iteration, QPainter::drawText() is the more efficient alternative, since the static text's layout would have to be recalculated to take the new state into consideration. Translating the painter will not cause the layout of the text to be recalculated, but will cause a very small performance impact on drawStaticText(). Altering any other parts of the painter's transformation or the painter's font will cause the layout of the static text to be recalculated. This should be avoided as often as possible to maximize the performance benefit of using QStaticText. In addition, only affine transformations are supported by drawStaticText(). Calling drawStaticText() on a projected painter will perform slightly worse than using the regular drawText() call, so this should be avoided. \code class MyWidget: public QWidget { public: MyWidget(QWidget *parent = nullptr) : QWidget(parent), m_staticText("This is static text") protected: void paintEvent(QPaintEvent *) { QPainter painter(this); painter.drawStaticText(0, 0, m_staticText); } private: QStaticText m_staticText; }; \endcode The QStaticText class can be used to mimic the behavior of QPainter::drawText() to a specific point with no boundaries, and also when QPainter::drawText() is called with a bounding rectangle. If a bounding rectangle is not required, create a QStaticText object without setting a preferred text width. The text will then occupy a single line. If you set a text width on the QStaticText object, this will bound the text. The text will be formatted so that no line exceeds the given width. The text width set for QStaticText will not automatically be used for clipping. To achieve clipping in addition to line breaks, use QPainter::setClipRect(). The position of the text is decided by the argument passed to QPainter::drawStaticText() and can change from call to call with a minimal impact on performance. For extra convenience, it is possible to apply formatting to the text using the HTML subset supported by QTextDocument. QStaticText will attempt to guess the format of the input text using Qt::mightBeRichText(), and interpret it as rich text if this function returns \c true. To force QStaticText to display its contents as either plain text or rich text, use the function QStaticText::setTextFormat() and pass in, respectively, Qt::PlainText and Qt::RichText. QStaticText can only represent text, so only HTML tags which alter the layout or appearance of the text will be respected. Adding an image to the input HTML, for instance, will cause the image to be included as part of the layout, affecting the positions of the text glyphs, but it will not be displayed. The result will be an empty area the size of the image in the output. Similarly, using tables will cause the text to be laid out in table format, but the borders will not be drawn. If it's the first time the static text is drawn, or if the static text, or the painter's font has been altered since the last time it was drawn, the text's layout has to be recalculated. On some paint engines, changing the matrix of the painter will also cause the layout to be recalculated. In particular, this will happen for any engine except for the OpenGL2 paint engine. Recalculating the layout will impose an overhead on the QPainter::drawStaticText() call where it occurs. To avoid this overhead in the paint event, you can call prepare() ahead of time to ensure that the layout is calculated. \sa QPainter::drawText(), QPainter::drawStaticText(), QTextLayout, QTextDocument 21712 -
qstatictext.h 1774 -
qstatictext_p.h 4192 -
qsyntaxhighlighter.cpp 18360 -
qsyntaxhighlighter.h 1781 -
qt_attribution.json 837 -
qtextcursor.cpp 80817 -
qtextcursor.h 5832 -
qtextcursor_p.h 2994 -
qtextdocument.cpp ! \fn bool Qt::mightBeRichText(QAnyStringView text) Returns \c true if the string \a text is likely to be rich text; otherwise returns \c false. This function uses a fast and therefore simple heuristic. It mainly checks whether there is something that looks like a tag before the first line break. Although the result may be correct for common cases, there is no guarantee. This function is defined in the \c <QTextDocument> header file. \note In Qt versions prior to 6.7, this function took QString only. 125404 -
qtextdocument.h 9068 -
qtextdocument_p.cpp Structure of a document: DOCUMENT :== FRAME_CONTENTS FRAME :== START_OF_FRAME FRAME_CONTENTS END_OF_FRAME FRAME_CONTENTS = LIST_OF_BLOCKS ((FRAME | TABLE) LIST_OF_BLOCKS)* TABLE :== (START_OF_FRAME TABLE_CELL)+ END_OF_FRAME TABLE_CELL = FRAME_CONTENTS LIST_OF_BLOCKS :== (BLOCK END_OF_PARA)* BLOCK BLOCK :== (FRAGMENT)* FRAGMENT :== String of characters END_OF_PARA :== 0x2029 # Paragraph separator in Unicode START_OF_FRAME :== 0xfdd0 END_OF_FRAME := 0xfdd1 Note also that LIST_OF_BLOCKS can be empty. Nevertheless, there is at least one valid cursor position there where you could start typing. The block format is in this case determined by the last END_OF_PARA/START_OF_FRAME/END_OF_FRAME (see below). Lists are not in here, as they are treated specially. A list is just a collection of (not necessarily connected) blocks, that share the same objectIndex() in the format that refers to the list format and object. The above does not clearly note where formats are. Here's how it looks currently: FRAGMENT: one charFormat associated END_OF_PARA: one charFormat, and a blockFormat for the _next_ block. START_OF_FRAME: one char format, and a blockFormat (for the next block). The format associated with the objectIndex() of the charFormat decides whether this is a frame or table and its properties END_OF_FRAME: one charFormat and a blockFormat (for the next block). The object() of the charFormat is the same as for the corresponding START_OF_BLOCK. The document is independent of the layout with certain restrictions: Cursor movement (esp. up and down) depend on the layout. You cannot have more than one layout, as the layout data of QTextObjects is stored in the text object itself. 55999 -
qtextdocument_p.h 13595 -
qtextdocumentfragment.cpp 47413 -
qtextdocumentfragment.h 1762 -
qtextdocumentfragment_p.h 5830 -
qtextdocumentlayout.cpp 168766 -
qtextdocumentlayout_p.h 2894 -
qtextdocumentwriter.cpp ! \since 4.5 \class QTextDocumentWriter \brief The QTextDocumentWriter class provides a format-independent interface for writing a QTextDocument to files or other devices. \inmodule QtGui \ingroup richtext-processing To write a document, construct a QTextDocumentWriter object with either a file name or a device object, and specify the document format to be written. You can construct a writer and set the format using setFormat() later. Call write() to write the document to the device. If the document is successfully written, this function returns \c true. However, if an error occurs when writing the document, it will return false. Call supportedDocumentFormats() for a list of formats that QTextDocumentWriter can write. Since the capabilities of the supported output formats vary considerably, the writer simply outputs the appropriate subset of objects for each format. This typically includes the formatted text and images contained in a document. 8896 -
qtextdocumentwriter.h 1187 -
qtextengine.cpp buffer 155462 -
qtextengine_p.h 22415 -
qtextformat.cpp ! \class QTextLength \reentrant \brief The QTextLength class encapsulates the different types of length used in a QTextDocument. \inmodule QtGui \ingroup richtext-processing When we specify a value for the length of an element in a text document, we often need to provide some other information so that the length is used in the way we expect. For example, when we specify a table width, the value can represent a fixed number of pixels, or it can be a percentage value. This information changes both the meaning of the value and the way it is used. Generally, this class is used to specify table widths. These can be specified either as a fixed amount of pixels, as a percentage of the containing frame's width, or by a variable width that allows it to take up just the space it requires. \sa QTextTable 115316 -
qtextformat.h 39553 -
qtextformat_p.h 2662 -
qtexthtmlparser.cpp 83051 -
qtexthtmlparser_p.h 8941 -
qtextimagehandler.cpp 7548 -
qtextimagehandler_p.h 1233 -
qtextlayout.cpp ! \class QTextLayout::FormatRange \reentrant \brief The QTextLayout::FormatRange structure is used to apply extra formatting information for a specified area in the text layout's content. \inmodule QtGui \sa QTextLayout::setFormats(), QTextLayout::draw() 119066 -
qtextlayout.h 7729 -
qtextlist.cpp ! \class QTextList \reentrant \brief The QTextList class provides a decorated list of items in a QTextDocument. \inmodule QtGui \ingroup richtext-processing A list contains a sequence of text blocks, each of which is marked with a bullet point or other symbol. Multiple levels of lists can be used, and the automatic numbering feature provides support for ordered numeric and alphabetical lists. Lists are created by using a text cursor to insert an empty list at the current position or by moving existing text into a new list. The \l{QTextCursor::insertList()} function inserts an empty block into the document at the cursor position, and makes it the first item in a list. \snippet textdocument-lists/mainwindow.cpp 0 The \l{QTextCursor::createList()} function takes the contents of the cursor's current block and turns it into the first item of a new list. The cursor's current list is found with \l{QTextCursor::currentList()}. The number of items in a list is given by count(). Each item can be obtained by its index in the list with the item() function. Similarly, the index of a given item can be found with itemNumber(). The text of each item can be found with the itemText() function. Note that the items in the list may not be adjacent elements in the document. For example, the top-level items in a multi-level list will be separated by the items in lower levels of the list. List items can be deleted by index with the removeItem() function. remove() deletes the specified item in the list. The list's format is set with setFormat() and read with format(). The format describes the decoration of the list itself, and not the individual items. \sa QTextBlock, QTextListFormat, QTextCursor 8763 -
qtextlist.h 1104 -
qtextmarkdownimporter.cpp 28127 -
qtextmarkdownimporter_p.h 4069 -
qtextmarkdownwriter.cpp ! \internal Measure how wide \a cell will be when written out, including the markup that writeBlock() will add: emphasis and code-span markers, backslash escapes and so on. Pass \a ignoreFormat exactly as it will be passed when writing the cell for real, so that the measurement matches. The only reliable way to know the width is to write the cell to a scratch stream and see how long the result is; so we temporarily redirect m_stream, and restore the writer's state afterwards, because this is only a measurement and must not affect the real output. 33251 -
qtextmarkdownwriter_p.h 2198 -
qtextobject.cpp ! \class QTextObject \reentrant \brief The QTextObject class is a base class for different kinds of objects that can group parts of a QTextDocument together. \inmodule QtGui \ingroup richtext-processing The common grouping text objects are lists (QTextList), frames (QTextFrame), and tables (QTextTable). A text object has an associated format() and document(). There are essentially two kinds of text objects: those that are used with blocks (block formats), and those that are used with characters (character formats). The first kind are derived from QTextBlockGroup, and the second kind from QTextFrame. You rarely need to use this class directly. When creating custom text objects, you will also need to reimplement QTextDocument::createObject() which acts as a factory method for creating text objects. \sa QTextDocument 46835 -
qtextobject.h 8229 -
qtextobject_p.h 1862 -
qtextodfwriter.cpp 49841 -
qtextodfwriter_p.h 3120 -
qtextoption.cpp ! Constructs a text option with default properties for text. The text alignment property is set to Qt::AlignLeft. The word wrap property is set to QTextOption::WordWrap. The using of design metrics flag is set to false. \note Calling this constructor will set the default text direction to Qt::LayoutDirectionAuto. 10927 -
qtextoption.h 3407 -
qtexttable.cpp ! \class QTextTableCell \reentrant \brief The QTextTableCell class represents the properties of a cell in a QTextTable. \inmodule QtGui \ingroup richtext-processing Table cells are pieces of document structure that belong to a table. The table orders cells into particular rows and columns; cells can also span multiple columns and rows. Cells are usually created when a table is inserted into a document with QTextCursor::insertTable(), but they are also created and destroyed when a table is resized. Cells contain information about their location in a table; you can obtain the row() and column() numbers of a cell, and its rowSpan() and columnSpan(). The format() of a cell describes the default character format of its contents. The firstCursorPosition() and lastCursorPosition() functions are used to obtain the extent of the cell in the document. \sa QTextTable, QTextTableFormat 40342 -
qtexttable.h 2778 -
qtexttable_p.h 1503 -
qzip.cpp 21611 -
qzipwriter_p.h 1836 -
REUSE.toml 217 -
unix -
windows -