diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-24 10:23:42 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-25 08:19:27 +0000 |
commit | 2a4f9cbf01c8ee4ecf571e4a8b9e121050e7bd95 (patch) | |
tree | 77708ac169f86a1eae4fabcfad1ff69c1fb89e32 /vcl | |
parent | 8821dc7f3ad75ec5a686952703dec25e16901656 (diff) |
Convert FontHintStyle to scoped enum
Change-Id: I6e59bf8beacc524897aede45420574148c0fecde
Reviewed-on: https://gerrit.libreoffice.org/25397
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/unx/fc_fontoptions.hxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/fontmanager/fontconfig.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/vcl/inc/unx/fc_fontoptions.hxx b/vcl/inc/unx/fc_fontoptions.hxx index d99870d1b6df..d085e260366b 100644 --- a/vcl/inc/unx/fc_fontoptions.hxx +++ b/vcl/inc/unx/fc_fontoptions.hxx @@ -42,7 +42,7 @@ public: meAntiAlias(ANTIALIAS_DONTKNOW), meAutoHint(AUTOHINT_DONTKNOW), meHinting(HINTING_DONTKNOW), - meHintStyle(HINT_SLIGHT), + meHintStyle(FontHintStyle::Slight), mpPattern(pPattern) {} ~FontConfigFontOptions(); @@ -50,7 +50,7 @@ public: FontHintStyle GetHintStyle() const { return meHintStyle; } bool DontUseEmbeddedBitmaps() const { return meEmbeddedBitmap == EMBEDDEDBITMAP_FALSE; } bool DontUseAntiAlias() const { return meAntiAlias == ANTIALIAS_FALSE; } - bool DontUseHinting() const { return (meHinting == HINTING_FALSE) || (GetHintStyle() == HINT_NONE); } + bool DontUseHinting() const { return (meHinting == HINTING_FALSE) || (GetHintStyle() == FontHintStyle::NONE); } void* GetPattern(void * /*pFace*/, bool /*bEmbolden*/) const; private: FcPattern* mpPattern; diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx index 73ad87afe6b0..957afb14b381 100644 --- a/vcl/unx/generic/fontmanager/fontconfig.cxx +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -1215,11 +1215,11 @@ FontConfigFontOptions* PrintFontManager::getFontOptions( pOptions->meHinting = hinting ? HINTING_TRUE : HINTING_FALSE; switch (hintstyle) { - case FC_HINT_NONE: pOptions->meHintStyle = HINT_NONE; break; - case FC_HINT_SLIGHT: pOptions->meHintStyle = HINT_SLIGHT; break; - case FC_HINT_MEDIUM: pOptions->meHintStyle = HINT_MEDIUM; break; + case FC_HINT_NONE: pOptions->meHintStyle = FontHintStyle::NONE; break; + case FC_HINT_SLIGHT: pOptions->meHintStyle = FontHintStyle::Slight; break; + case FC_HINT_MEDIUM: pOptions->meHintStyle = FontHintStyle::Medium; break; default: // fall through - case FC_HINT_FULL: pOptions->meHintStyle = HINT_FULL; break; + case FC_HINT_FULL: pOptions->meHintStyle = FontHintStyle::Full; break; } } diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 7e1dbc9bf935..933771ca2a5e 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -571,15 +571,15 @@ void ServerFont::SetFontOptions(const std::shared_ptr<FontConfigFontOptions>& xF mnLoadFlags |= FT_LOAD_TARGET_NORMAL; switch (mxFontOptions->GetHintStyle()) { - case HINT_NONE: + case FontHintStyle::NONE: mnLoadFlags |= FT_LOAD_NO_HINTING; break; - case HINT_SLIGHT: + case FontHintStyle::Slight: mnLoadFlags |= FT_LOAD_TARGET_LIGHT; break; - case HINT_MEDIUM: + case FontHintStyle::Medium: break; - case HINT_FULL: + case FontHintStyle::Full: default: break; } |