diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-12 10:41:35 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-12 11:43:51 +0000 |
commit | da91ce535e51c814d56a6b1eddb44b5d71989261 (patch) | |
tree | 9fd6c577b561291512d94728030ca50268aef009 /vcl/win | |
parent | 7e16ec0347453851ef2f8870cfcf9fdbbc6bb99f (diff) |
remove unused FontFamily argument in ImplFindByAttributes
move ImplFindByLocale to windows only code, rename to
findDevFontListByLocale
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/source/gdi/salgdi3.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index 2cea95951d11..3e24d7572b0d 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -544,6 +544,19 @@ bool WinGlyphFallbackSubstititution::HasMissingChars( const ImplFontData* pFace, return bHasMatches; } +namespace +{ + //used by 2-level font fallback + ImplDevFontListData* findDevFontListByLocale(const ImplDevFontList &rDevFontList, + const com::sun::star::lang::Locale& rLocale ) + { + // get the default font for a specified locale + const DefaultFontConfiguration& rDefaults = DefaultFontConfiguration::get(); + const rtl::OUString aDefault = rDefaults.getUserInterfaceFont(rLocale); + return rDevFontList.ImplFindByTokenNames(aDefault); + } +} + // find a fallback font for missing characters // TODO: should stylistic matches be searched and prefered? bool WinGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFontSelData, rtl::OUString& rMissingChars ) const @@ -571,7 +584,7 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFon // first level fallback: // try use the locale specific default fonts defined in VCL.xcu const ImplDevFontList* pDevFontList = ImplGetSVData()->maGDIData.mpScreenFontList; - /*const*/ ImplDevFontListData* pDevFont = pDevFontList->ImplFindByLocale( aLocale ); + /*const*/ ImplDevFontListData* pDevFont = findDevFontListByLocale(*pDevFontList, aLocale); if( pDevFont ) { const ImplFontData* pFace = pDevFont->FindBestFontFace( rFontSelData ); @@ -585,7 +598,7 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFon // are the missing characters symbols? pDevFont = pDevFontList->ImplFindByAttributes( IMPL_FONT_ATTR_SYMBOL, rFontSelData.meWeight, rFontSelData.meWidthType, - rFontSelData.meFamily, rFontSelData.meItalic, rFontSelData.maSearchName ); + rFontSelData.meItalic, rFontSelData.maSearchName ); if( pDevFont ) { const ImplFontData* pFace = pDevFont->FindBestFontFace( rFontSelData ); |