Krita Source Code Documentation
Loading...
Searching...
No Matches
KoOpenTypeFeatureInfoFactory.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6#include <QString>
7#include <QStringList>
8#include <QVector>
9#include <QScopedPointer>
10#include <kritaflake_export.h>
11
12/*
13 * KoOpenTypeFeatureInfo provides basic info about
14 * each opentype feature, with translatable strings.
15 **/
17{
38 KoOpenTypeFeatureInfo(const QByteArray &tag,
39 const QString &name,
40 const QString &description,
42 const bool glyphPalette = false,
43 const int maxValue = 1)
44 : tag(tag)
45 , name(name)
47 , tables(tables)
50 {
51 }
52
53 QByteArray tag;
54
55 QString name;
56
57 QString description;
58
59 QString sample;
60
62
64
65 bool glyphPalette{false};
66
68
69};
70
77class KRITAFLAKE_EXPORT KoOpenTypeFeatureInfoFactory
78{
79public:
82
90 KoOpenTypeFeatureInfo infoByTag(const QByteArray &tag) const;
91
96 QList<QString> tags() const;
97
98private:
99 struct Private;
100
101 QScopedPointer<Private> d;
102};
The KoOpenTypeFeatureInfoFactory class.
QVector< OpenTypeTable > tables
Named parameters. Only used by CVXX features and retrieved from the font.
@ GPOS8
Chained-Contextual positioning.
@ GSUB2
Multiple substitution (1 -> 2)
@ GPOS2
Pair position adjustment.
@ GSUB8
Reverse Chained Contextual substitution.
@ GSUB7
Extension substitution.
@ GPOS1
Single position adjustment.
@ GSUB3
Alternate substitution.
@ GPOS7
Contextual positioning.
@ GPOS4
Mark-to-base adjustment.
@ GPOS5
Mark-to-ligature adjustment.
@ GSUB5
Contextual substitution.
@ GPOS6
Mark-to-mark adjustment.
@ GSUB6
Chained Contextual substitution.
QString description
Description of the feature.
QString name
User-friendly name.
KoOpenTypeFeatureInfo(const QByteArray &tag, const QString &name, const QString &description, const QVector< OpenTypeTable > &tables, const bool glyphPalette=false, const int maxValue=1)
bool glyphPalette
Whether the feature should be visible in the glyph palette.
QString sample
Sample of the feature, if any. Only used by CVXX features and retrieved from the font.
int maxValue
The maximum value possible, this is by default 1 (on), but for alternate substitution(gsub 3),...