|
Krita Source Code Documentation
|
Public Member Functions | |
| Private () | |
Public Attributes | |
| KisForest< FontFamilyNode > | fontFamilyCollection |
| fontFamilyCollection | |
Definition at line 222 of file KoFFWWSConverter.cpp.
|
inline |
Definition at line 223 of file KoFFWWSConverter.cpp.
| KisForest<FontFamilyNode> KoFFWWSConverter::Private::fontFamilyCollection |
fontFamilyCollection
The main reason this WWS converter class exists, is because there's 3 major ways that font-families get sorted:
In practice, this means that a single font file can have unique names for each of these three families, as different systems may only support a certain type. Because CSS only really has controls for WWS and RIBBI style, we need to untangle the font-families so we can identify the correct name for a given font within these restrictions.
For this purpose, we create a font-family collection tree that is sorted as such:
This tree then allows us to search on all 3 entries, in particular their family names (and their localized variants), and will be able to fall-back on the other names if the name that the user selected is not the WWS/RIBBI name. (For example, an artist sets the name of the font family to "Amstelvar", which is the typographic name, but the WWS name is "Amstelvar Roman". This class will prioritize WWS values when searching, but still select the typographic name if it cannot match the wws name. Similarly, if a full font name (yes, that exists too) has been used, this will be prioritized).
Definition at line 256 of file KoFFWWSConverter.cpp.