diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-26 08:09:59 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-28 08:44:40 +0100 |
commit | 0eb27ddf8138e6c91a33817ec938a64b05a4ce82 (patch) | |
tree | fd60724f15cea72ac13eff4a5c1d9b798e49c6ab /vcl/win | |
parent | 6fc1efd5e899b13f3eefccf60919dd8a44a3e4d3 (diff) |
-Werror,-Wunused-function
Change-Id: Id149af78312b205fbf14f0c2438dd4ad741f49ab
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/source/gdi/salgdi3.cxx | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index 98fde754317d..732118689fef 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -769,79 +769,6 @@ inline BYTE ImplPitchToWin( FontPitch ePitch ) return DEFAULT_PITCH; } -static ImplDevFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXA& rEnumFont, - const NEWTEXTMETRICA& rMetric, DWORD nFontType ) -{ - ImplDevFontAttributes aDFA; - - const LOGFONTA rLogFont = rEnumFont.elfLogFont; - - // get font face attributes - aDFA.SetFamilyType(ImplFamilyToSal( rLogFont.lfPitchAndFamily )); - aDFA.SetWidthType(WIDTH_DONTKNOW); - aDFA.SetWeight(ImplWeightToSal( rLogFont.lfWeight )); - aDFA.SetItalic((rLogFont.lfItalic) ? ITALIC_NORMAL : ITALIC_NONE); - aDFA.SetPitch(ImplLogPitchToSal( rLogFont.lfPitchAndFamily )); - aDFA.SetSymbolFlag(rLogFont.lfCharSet == SYMBOL_CHARSET); - - // get the font face name - aDFA.SetFamilyName(ImplSalGetUniString( rLogFont.lfFaceName )); - - // use the face's style name only if it looks reasonable - const char* pStyleName = (const char*)rEnumFont.elfStyle; - const char* pEnd = pStyleName + sizeof( rEnumFont.elfStyle ); - const char* p = pStyleName; - for(; *p && (p < pEnd); ++p ) - if( (0x00 < *p) && (*p < 0x20) ) - break; - if( p < pEnd ) - aDFA.SetStyleName(ImplSalGetUniString( pStyleName )); - - // get device specific font attributes - aDFA.mbOrientation = (nFontType & RASTER_FONTTYPE) == 0; - aDFA.mbDevice = (rMetric.tmPitchAndFamily & TMPF_DEVICE) != 0; - - aDFA.mbEmbeddable = false; - aDFA.mbSubsettable = false; - if( 0 != (rMetric.ntmFlags & (NTM_TT_OPENTYPE | NTM_PS_OPENTYPE)) - || 0 != (rMetric.tmPitchAndFamily & TMPF_TRUETYPE)) - aDFA.mbSubsettable = true; - else if( 0 != (rMetric.ntmFlags & NTM_TYPE1) ) // TODO: implement subsetting for type1 too - aDFA.mbEmbeddable = true; - - // heuristics for font quality - // - standard-type1 > opentypeTT > truetype > non-standard-type1 > raster - // - subsetting > embedding > none - aDFA.mnQuality = 0; - if( rMetric.tmPitchAndFamily & TMPF_TRUETYPE ) - aDFA.mnQuality += 50; - if( 0 != (rMetric.ntmFlags & (NTM_TT_OPENTYPE | NTM_PS_OPENTYPE)) ) - aDFA.mnQuality += 10; - if( aDFA.mbSubsettable ) - aDFA.mnQuality += 200; - else if( aDFA.mbEmbeddable ) - aDFA.mnQuality += 100; - - // #i38665# prefer Type1 versions of the standard postscript fonts - if( aDFA.mbEmbeddable ) - { - if( aDFA.GetFamilyName() == "AvantGarde" - || aDFA.GetFamilyName() == "Bookman" - || aDFA.GetFamilyName() == "Courier" - || aDFA.GetFamilyName() == "Helvetica" - || aDFA.GetFamilyName() == "NewCenturySchlbk" - || aDFA.GetFamilyName() == "Palatino" - || aDFA.GetFamilyName() == "Symbol" - || aDFA.GetFamilyName() == "Times" - || aDFA.GetFamilyName() == "ZapfChancery" - || aDFA.GetFamilyName() == "ZapfDingbats" ) - aDFA.mnQuality += 500; - } - - // TODO: add alias names - return aDFA; -} - static ImplDevFontAttributes WinFont2DevFontAttributes( const ENUMLOGFONTEXW& rEnumFont, const NEWTEXTMETRICW& rMetric, DWORD nFontType ) { |