diff options
Diffstat (limited to 'vcl/inc/PhysicalFontFamily.hxx')
-rw-r--r-- | vcl/inc/PhysicalFontFamily.hxx | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/vcl/inc/PhysicalFontFamily.hxx b/vcl/inc/PhysicalFontFamily.hxx index 0363de3bea6e..07d329c711d9 100644 --- a/vcl/inc/PhysicalFontFamily.hxx +++ b/vcl/inc/PhysicalFontFamily.hxx @@ -30,14 +30,20 @@ class PhysicalFontFace; class PhysicalFontCollection; // flags for mnTypeFaces member -#define FONT_FAMILY_SCALABLE (1<<0) -#define FONT_FAMILY_SYMBOL (1<<1) -#define FONT_FAMILY_NONESYMBOL (1<<2) -#define FONT_FAMILY_LIGHT (1<<4) -#define FONT_FAMILY_BOLD (1<<5) -#define FONT_FAMILY_NORMAL (1<<6) -#define FONT_FAMILY_NONEITALIC (1<<8) -#define FONT_FAMILY_ITALIC (1<<9) +enum class FontTypeFaces { + NONE = 0x00, + Scalable = 0x01, + Symbol = 0x02, + NoneSymbol = 0x04, + Light = 0x08, + Bold = 0x10, + Normal = 0x20, + NoneItalic = 0x40, + Italic = 0x80 +}; +namespace o3tl { + template<> struct typed_flags<FontTypeFaces> : is_typed_flags<FontTypeFaces, 0xff> {}; +}; class PhysicalFontFamily { @@ -50,7 +56,7 @@ public: const OUString& GetAliasNames() const { return maMapNames; } bool IsScalable() const { return maFontFaces[0]->IsScalable(); } int GetMinQuality() const { return mnMinQuality; } - int GetTypeFaces() const { return mnTypeFaces; } + FontTypeFaces GetTypeFaces() const { return mnTypeFaces; } void GetFontHeights( std::set<int>& rHeights ) const; const OUString& GetMatchFamilyName() const { return maMatchFamilyName; } @@ -77,7 +83,7 @@ private: OUString maFamilyName; // original font family name OUString maSearchName; // normalized font family name OUString maMapNames; // fontname aliases - int mnTypeFaces; // Typeface Flags + FontTypeFaces mnTypeFaces; // Typeface Flags FontFamily meFamily; FontPitch mePitch; int mnMinQuality; // quality of the worst font face |