Krita Source Code Documentation
Loading...
Searching...
No Matches
KisFontFunctions.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6#ifndef KISFONTFUNCTIONS_H
7#define KISFONTFUNCTIONS_H
8
9#include <QObject>
10#include <QQmlEngine>
11class QQmlEngine;
12class QJSEngine;
18class KisFontFunctions: public QObject {
19
20 Q_OBJECT
21 QML_NAMED_ELEMENT(FontFunctions)
22
23public:
24
26 Q_INVOKABLE static QString wwsFontFamilyName(QString familyName);
27
29 Q_INVOKABLE static QVariant wwsFontFamilyNameVariant(QString familyName);
30
32 Q_INVOKABLE static QString sampleTagForQLocale(const QLocale &locale);
33
36 Q_INVOKABLE static QVariantMap getMapFromQVariant(QVariant var);
37
39 Q_INVOKABLE static bool isBitmapType(int type);
40 Q_INVOKABLE static bool isPostScriptType(int type);
41 Q_INVOKABLE static bool isOpenType(int type);
42
43};
44
45#endif // KISFONTFUNCTIONS_H
static Q_INVOKABLE bool isBitmapType(int type)
Because we can't register KoSvgText for qt 6 in this plugin, we'll test if the enum is valid here.
static Q_INVOKABLE bool isPostScriptType(int type)
static Q_INVOKABLE QString sampleTagForQLocale(const QLocale &locale)
Returns the sample tag for a given locale, calls KoWritingSystemUtils.
static Q_INVOKABLE QString wwsFontFamilyName(QString familyName)
Returns the wwsname when present, otherwise returns the family name;.
static Q_INVOKABLE QVariantMap getMapFromQVariant(QVariant var)
static Q_INVOKABLE bool isOpenType(int type)
static Q_INVOKABLE QVariant wwsFontFamilyNameVariant(QString familyName)
Returns the wws name as a variant which can be invalid when not found.