Krita Source Code Documentation
Loading...
Searching...
No Matches
KoFontFamily.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#ifndef KOFONTFAMILY_H
7#define KOFONTFAMILY_H
8
9#include <KoResource.h>
10#include <KoFFWWSConverter.h>
11
12class KoFontFamily;
14
19class KRITAFLAKE_EXPORT KoFontFamily : public KoResource
20{
21public:
22 explicit KoFontFamily(KoFontFamilyWWSRepresentation representation);
23
24 KoFontFamily(const QString &filename);
26
27 KoFontFamily(const KoFontFamily &rhs);
28 KoFontFamily &operator=(const KoFontFamily &rhs) = delete;
29 KoResourceSP clone() const override;
30
31 bool loadFromDevice(QIODevice *dev, KisResourcesInterfaceSP resourcesInterface) override;
32
33 bool isSerializable() const override;
34 QPair<QString, QString> resourceType() const override;
35
36 void updateThumbnail() override;
37
39 QString typographicFamily() const;
40
42 QString translatedFontName(QStringList locales) const;
43
45 bool isVariable() const;
47 bool colorBitmap() const;
49 bool colorClrV0() const;
51 bool colorClrV1() const;
53 bool colorSVG() const;
54
57
58 QDateTime lastModified() const;
59
60private:
61 struct Private;
62 QScopedPointer<Private> d;
63};
64
65#endif // KOFONTFAMILY_H
QSharedPointer< KoFontFamily > KoFontFamilySP
The KoFontFamily class Abstract representation of a Weight/Width/Slant font family,...
QScopedPointer< Private > d
KoFontFamily & operator=(const KoFontFamily &rhs)=delete
virtual QPair< QString, QString > resourceType() const =0
virtual bool isSerializable() const
virtual KoResourceSP clone() const =0
virtual void updateThumbnail()
updateThumbnail updates the thumbnail for this resource. Reimplement if your thumbnail is something e...
virtual bool loadFromDevice(QIODevice *dev, KisResourcesInterfaceSP resourcesInterface)=0