|
Krita Source Code Documentation
|
The KoFontGlyphModel class Creates a tree model of all the glyphs in a given face. More...
#include <KoFontGlyphModel.h>
Inheritance diagram for KoFontGlyphModel:Classes | |
| struct | Private |
Public Types | |
| enum | GlyphType { Base , UnicodeVariationSelector , OpenType } |
| enum | Roles { OpenTypeFeatures = Qt::UserRole + 1 , GlyphLabel , ChildCount } |
Public Member Functions | |
| QVector< KoUnicodeBlockData > | blocks () const |
| blocks | |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| QMap< QString, KoOpenTypeFeatureInfo > | featureInfo () const |
| featureInfo | |
| bool | hasChildren (const QModelIndex &parent=QModelIndex()) const override |
| QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
| QModelIndex | indexForString (QString grapheme) |
| KoFontGlyphModel (QObject *parent=nullptr) | |
| QModelIndex | parent (const QModelIndex &child) const override |
| QHash< int, QByteArray > | roleNames () const override |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| void | setFace (FT_FaceSP face, QLatin1String language=QLatin1String(), bool samplesOnly=false) |
| setFace set the face to retrieve glyph data for. | |
| ~KoFontGlyphModel () | |
Private Attributes | |
| QScopedPointer< Private > | d |
The KoFontGlyphModel class Creates a tree model of all the glyphs in a given face.
The primary parents are the basic codepoints, the children of those parents (if any), are glyph variations.
Definition at line 23 of file KoFontGlyphModel.h.
| Enumerator | |
|---|---|
| Base | |
| UnicodeVariationSelector | |
| OpenType | |
Definition at line 27 of file KoFontGlyphModel.h.
| Enumerator | |
|---|---|
| OpenTypeFeatures | |
| GlyphLabel | |
| ChildCount | |
Definition at line 36 of file KoFontGlyphModel.h.
| KoFontGlyphModel::KoFontGlyphModel | ( | QObject * | parent = nullptr | ) |
Definition at line 326 of file KoFontGlyphModel.cpp.
| KoFontGlyphModel::~KoFontGlyphModel | ( | ) |
Definition at line 332 of file KoFontGlyphModel.cpp.
| QVector< KoUnicodeBlockData > KoFontGlyphModel::blocks | ( | ) | const |
blocks
Definition at line 539 of file KoFontGlyphModel.cpp.
References d.
|
override |
Definition at line 470 of file KoFontGlyphModel.cpp.
References parent().
|
override |
Definition at line 344 of file KoFontGlyphModel.cpp.
References KoFontGlyphModel::Private::GlyphInfo::baseString, KoFontGlyphModel::Private::CodePointInfo::childCount(), ChildCount, d, KoFontGlyphModel::Private::GlyphInfo::featureIndex, GlyphLabel, KoFontGlyphModel::Private::CodePointInfo::glyphs, index(), KoOpenTypeFeatureInfo::name, KoOpenTypeFeatureInfo::namedParameters, OpenType, OpenTypeFeatures, KoFontGlyphModel::Private::GlyphInfo::type, KoFontGlyphModel::Private::InfoNode::ucs, unicodeHexFromUCS(), UnicodeVariationSelector, and KoFontGlyphModel::Private::CodePointInfo::utfString.
| QMap< QString, KoOpenTypeFeatureInfo > KoFontGlyphModel::featureInfo | ( | ) | const |
featureInfo
Definition at line 544 of file KoFontGlyphModel.cpp.
References d.
|
override |
|
override |
Definition at line 428 of file KoFontGlyphModel.cpp.
References d, KoFontGlyphModel::Private::CodePointInfo::glyphs, and parent().
| QModelIndex KoFontGlyphModel::indexForString | ( | QString | grapheme | ) |
Definition at line 484 of file KoFontGlyphModel.cpp.
|
override |
Definition at line 443 of file KoFontGlyphModel.cpp.
References d, and KoFontGlyphModel::Private::InfoNode::ucs.
|
override |
Definition at line 530 of file KoFontGlyphModel.cpp.
References ChildCount, GlyphLabel, and OpenTypeFeatures.
|
override |
| void KoFontGlyphModel::setFace | ( | FT_FaceSP | face, |
| QLatin1String | language = QLatin1String(), | ||
| bool | samplesOnly = false ) |
setFace set the face to retrieve glyph data for.
| face | – the face. |
| language | – the language for which to retrieve data for, OpenType data can have different glyphs depending on the language. |
| samplesOnly | – Whether to only retrieve enough data for 6 samples, or to retrieve the full glyph layout. Turning this on speeds up loading. |
Definition at line 499 of file KoFontGlyphModel.cpp.
References KoUnicodeBlockDataFactory::blockForUCS(), KoFontGlyphModel::Private::charMap(), d, KoFontGlyphModel::Private::getOpenTypeTables(), KoFontGlyphModel::Private::getVSData(), KoUnicodeBlockDataFactory::noBlock(), and sortBlocks().
|
private |
Definition at line 77 of file KoFontGlyphModel.h.