|
Krita Source Code Documentation
|
The KoFontFamily class Abstract representation of a Weight/Width/Slant font family, as determined by KoFFWWSConverter. More...
#include <KoFontFamily.h>
Inheritance diagram for KoFontFamily:Classes | |
| struct | Private |
Public Member Functions | |
| QList< KoSvgText::FontFamilyAxis > | axes () const |
| KoResourceSP | clone () const override |
| bool | colorBitmap () const |
| Font has color bitmaps. | |
| bool | colorClrV0 () const |
| Font has colrv0 layers. | |
| bool | colorClrV1 () const |
| Font has colrv1 layers – doesn't yet work. | |
| bool | colorSVG () const |
| Font is SVG. | |
| bool | isSerializable () const override |
| bool | isVariable () const |
| Font is variable. | |
| KoFontFamily (const KoFontFamily &rhs) | |
| KoFontFamily (const QString &filename) | |
| KoFontFamily (KoFontFamilyWWSRepresentation representation) | |
| QDateTime | lastModified () const |
| bool | loadFromDevice (QIODevice *dev, KisResourcesInterfaceSP resourcesInterface) override |
| KoFontFamily & | operator= (const KoFontFamily &rhs)=delete |
| QPair< QString, QString > | resourceType () const override |
| QList< KoSvgText::FontFamilyStyleInfo > | styles () const |
| QString | translatedFontName (QStringList locales) const |
| Return the translated name for a given locale... | |
| QString | typographicFamily () const |
| Returns the typographic family name, if any. | |
| void | updateThumbnail () override |
| updateThumbnail updates the thumbnail for this resource. Reimplement if your thumbnail is something else than the image set with setImage. | |
| ~KoFontFamily () | |
Public Member Functions inherited from KoResource | |
| bool | active () const |
| void | addMetaData (QString key, QVariant value) |
| store the given key, value pair in the resource | |
| virtual void | clearSideLoadedResources () |
| virtual QString | defaultFileExtension () const |
| virtual QList< KoResourceLoadResult > | embeddedResources (KisResourcesInterfaceSP globalResourcesInterface) const |
| QString | filename () const |
| QImage | image () const |
| bool | isDirty () const |
| virtual bool | isEphemeral () const |
| KoResource () | |
| KoResource (const KoResource &rhs) | |
| KoResource (const QString &filename) | |
| virtual QList< KoResourceLoadResult > | linkedResources (KisResourcesInterfaceSP globalResourcesInterface) const |
| bool | load (KisResourcesInterfaceSP resourcesInterface) |
| QString | md5Sum (bool generateIfEmpty=true) const |
| QMap< QString, QVariant > | metadata () const |
| get a map with all the metadata | |
| virtual QString | name () const |
| KoResource & | operator= (const KoResource &rhs)=delete |
| bool | permanent () const |
| virtual QList< int > | requiredCanvasResources () const |
| QList< KoResourceLoadResult > | requiredResources (KisResourcesInterfaceSP globalResourcesInterface) const |
| int | resourceId () const |
| bool | save () |
| virtual bool | saveToDevice (QIODevice *dev) const |
| void | setActive (bool active) |
| void | setDirty (bool value) |
| Mark the preset as modified but not saved. | |
| void | setFilename (const QString &filename) |
| void | setImage (const QImage &image) |
| void | setMD5Sum (const QString &md5sum) |
| Set the md5sum of this resource. It must be in hex-encoded string format. | |
| void | setName (const QString &name) |
| void | setPermanent (bool permanent) |
| void | setResourceId (int id) |
| void | setStorageLocation (const QString &location) |
| void | setValid (bool valid) |
| void | setVersion (int version) |
| virtual QList< KoResourceLoadResult > | sideLoadedResources (KisResourcesInterfaceSP globalResourcesInterface) const |
| KoResourceSignature | signature () const |
| QString | storageLocation () const |
| QList< KoResourceLoadResult > | takeSideLoadedResources (KisResourcesInterfaceSP globalResourcesInterface) |
| virtual QImage | thumbnail () const |
| thumbnail the thumbnail image to use in resource selectors | |
| virtual QString | thumbnailPath () const |
| thumbnailPath returns the path to a separate thumbnail image, outside the actual resource file itself. If the path is relative, it is supposed start in the same location as the resource itself. If it's absolute, that is, it starts with "/", it is from the root of the storage. | |
| bool | valid () const |
| int | version () const |
| Get the version of the resource. | |
| virtual | ~KoResource () |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Private Attributes | |
| QScopedPointer< Private > | d |
Additional Inherited Members | |
Public Attributes inherited from KoResource | |
| bool | active {true} |
| QString | filename |
| QImage | image |
| QString | md5sum |
| QMap< QString, QVariant > | metadata |
| bool | modified {false} |
| QString | name |
| bool | permanent {false} |
| int | resourceId {-1} |
| QString | storageLocation |
| bool | valid {false} |
| int | version {-1} |
Public Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
The KoFontFamily class Abstract representation of a Weight/Width/Slant font family, as determined by KoFFWWSConverter.
Definition at line 19 of file KoFontFamily.h.
|
explicit |
Definition at line 93 of file KoFontFamily.cpp.
References KoResource::addMetaData(), AXES, axes(), KoFontFamilyWWSRepresentation::axes, COLOR_BITMAP, COLOR_CLRV0, COLOR_CLRV1, COLOR_SVG, KoFontFamilyWWSRepresentation::colorBitMap, KoFontFamilyWWSRepresentation::colorClrV0, KoFontFamilyWWSRepresentation::colorClrV1, KoFontFamilyWWSRepresentation::colorSVG, FONT_TYPE, KoFontFamilyWWSRepresentation::fontFamilyName, KoMD5Generator::generateHash(), IS_VARIABLE, KoFontFamilyWWSRepresentation::isVariable, LAST_MODIFIED, KoFontFamilyWWSRepresentation::lastModified, localeHashtoVariantMap(), LOCALIZED_FONT_FAMILY, LOCALIZED_TYPOGRAPHIC_NAME, LOCALIZED_TYPOGRAPHIC_STYLE, KoFontFamilyWWSRepresentation::localizedFontFamilyNames, KoFontFamilyWWSRepresentation::localizedTypographicFamily, KoFontFamilyWWSRepresentation::localizedTypographicStyles, SAMPLE_STRING, KoFontFamilyWWSRepresentation::sampleStrings, KoResource::setMD5Sum(), KoResource::setName(), KoResource::setValid(), STYLES, styles(), KoFontFamilyWWSRepresentation::styles, SUPPORTED_LANGUAGES, KoFontFamilyWWSRepresentation::supportedLanguages, KoFontFamilyWWSRepresentation::type, TYPOGRAPHIC_NAME, and KoFontFamilyWWSRepresentation::typographicFamilyName.
| KoFontFamily::KoFontFamily | ( | const QString & | filename | ) |
Definition at line 139 of file KoFontFamily.cpp.
References ResourceType::FontFamilies, KoMD5Generator::generateHash(), KoResource::setMD5Sum(), and KoResource::setValid().
| KoFontFamily::~KoFontFamily | ( | ) |
Definition at line 146 of file KoFontFamily.cpp.
| KoFontFamily::KoFontFamily | ( | const KoFontFamily & | rhs | ) |
Definition at line 150 of file KoFontFamily.cpp.
References KoResource::addMetaData(), KoResource::filename, KoResource::metadata, KoResource::setFilename(), and KoResource::setValid().
| QList< KoSvgText::FontFamilyAxis > KoFontFamily::axes | ( | ) | const |
Definition at line 249 of file KoFontFamily.cpp.
References AXES, axes(), and KoResource::metadata.
|
overridevirtual |
Implements KoResource.
Definition at line 162 of file KoFontFamily.cpp.
References KoFontFamily().
| bool KoFontFamily::colorBitmap | ( | ) | const |
Font has color bitmaps.
Definition at line 229 of file KoFontFamily.cpp.
References COLOR_BITMAP, and KoResource::metadata.
| bool KoFontFamily::colorClrV0 | ( | ) | const |
Font has colrv0 layers.
Definition at line 234 of file KoFontFamily.cpp.
References COLOR_CLRV0, and KoResource::metadata.
| bool KoFontFamily::colorClrV1 | ( | ) | const |
Font has colrv1 layers – doesn't yet work.
Definition at line 239 of file KoFontFamily.cpp.
References COLOR_CLRV1, and KoResource::metadata.
| bool KoFontFamily::colorSVG | ( | ) | const |
Font is SVG.
Definition at line 244 of file KoFontFamily.cpp.
References COLOR_SVG, and KoResource::metadata.
|
overridevirtual |
Serializable resource is the one which can be saved/loaded into a specific storage via saveToDevice()/loadFromDevice() methods. Some resources, like KisAbrBrush or KisPsdLayerStyle, are stored in specific libraries in "batches". Such resources cannot be saved individually. They are created by the corresponding factories.
In contrast to ephemeral resource, non-serializable resource will always have a correct md5Sum() and may be stored in the resources database.
Reimplemented from KoResource.
Definition at line 174 of file KoFontFamily.cpp.
| bool KoFontFamily::isVariable | ( | ) | const |
Font is variable.
Definition at line 224 of file KoFontFamily.cpp.
References IS_VARIABLE, and KoResource::metadata.
| QDateTime KoFontFamily::lastModified | ( | ) | const |
Definition at line 269 of file KoFontFamily.cpp.
References LAST_MODIFIED, and KoResource::metadata.
|
overridevirtual |
Implements KoResource.
Definition at line 167 of file KoFontFamily.cpp.
|
delete |
|
overridevirtual |
Implements KoResource.
Definition at line 179 of file KoFontFamily.cpp.
References ResourceType::FontFamilies.
| QList< KoSvgText::FontFamilyStyleInfo > KoFontFamily::styles | ( | ) | const |
Definition at line 259 of file KoFontFamily.cpp.
References KoResource::metadata, STYLES, and styles().
| QString KoFontFamily::translatedFontName | ( | QStringList | locales | ) | const |
Return the translated name for a given locale...
Definition at line 211 of file KoFontFamily.cpp.
References KoResource::filename, LOCALIZED_FONT_FAMILY, KoResource::metadata, and KoResource::name.
| QString KoFontFamily::typographicFamily | ( | ) | const |
Returns the typographic family name, if any.
Definition at line 206 of file KoFontFamily.cpp.
References KoResource::metadata, and TYPOGRAPHIC_NAME.
|
overridevirtual |
updateThumbnail updates the thumbnail for this resource. Reimplement if your thumbnail is something else than the image set with setImage.
Reimplemented from KoResource.
Definition at line 184 of file KoFontFamily.cpp.
References KoResource::addMetaData(), COLOR_BITMAP, COLOR_CLRV0, KoResource::filename, generateImage(), generateSVG(), KoResource::metadata, SAMPLE_BBOX, SAMPLE_STRING, SAMPLE_SVG, and KoResource::setImage().
|
private |
Definition at line 62 of file KoFontFamily.h.