diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2019-08-28 12:46:19 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2019-09-05 19:24:01 +0200 |
commit | fc0119d0afb7775663762d972b6d5dbc15581c66 (patch) | |
tree | f0fbcde18f81ef89b54b2df879c2c4221ef051d2 /vcl | |
parent | 8b7434bc04de343b47d3107995cd9c3c96de40b0 (diff) |
Remove effectively dead code
We dropped support for non-SFNT fonts for a while now.
Change-Id: Iaa2ea308effa7328bd84240cf29fc3fd117d418a
Reviewed-on: https://gerrit.libreoffice.org/78637
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 51 |
1 files changed, 6 insertions, 45 deletions
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index 525da6e52b43..ed473e9c198a 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -465,9 +465,6 @@ FreetypeFont::FreetypeFont(LogicalFontInstance* pFontInstance, FreetypeFontInfo* if( mpFontInfo->IsSymbolFont() ) { FT_Encoding eEncoding = FT_ENCODING_MS_SYMBOL; - if (!FT_IS_SFNT(maFaceFT)) - eEncoding = FT_ENCODING_ADOBE_CUSTOM; // freetype wants this for PS symbol fonts - FT_Select_Charmap(maFaceFT, eEncoding); } @@ -727,48 +724,12 @@ bool FreetypeFontInfo::GetFontCodeRanges( CmapResult& rResult ) const { rResult.mbSymbolic = IsSymbolFont(); - // TODO: is the full CmapResult needed on platforms calling this? - if( FT_IS_SFNT( maFaceFT ) ) - { - sal_uLong nLength = 0; - const unsigned char* pCmap = GetTable( "cmap", &nLength ); - if( pCmap && (nLength > 0) ) - if( ParseCMAP( pCmap, nLength, rResult ) ) - return true; - } - - std::vector<sal_uInt32> aCodes; - - // FT's coverage is available since FT>=2.1.0 (OOo-baseline>=2.1.4 => ok) - aCodes.reserve( 0x1000 ); - FT_UInt nGlyphIndex; - for( sal_uInt32 cCode = FT_Get_First_Char( maFaceFT, &nGlyphIndex );; ) - { - if( !nGlyphIndex ) - break; - aCodes.push_back( cCode ); // first code inside range - sal_uInt32 cNext; - do cNext = FT_Get_Next_Char( maFaceFT, cCode, &nGlyphIndex ); while( cNext == ++cCode ); - aCodes.push_back( cCode ); // first code outside range - cCode = cNext; - } - - const int nCount = aCodes.size(); - if( !nCount) { - if( !rResult.mbSymbolic ) - return false; - - // we usually get here for Type1 symbol fonts - aCodes.push_back( 0xF020 ); - aCodes.push_back( 0xF100 ); - } - - sal_uInt32* pCodes = new sal_uInt32[ nCount ]; - for( int i = 0; i < nCount; ++i ) - pCodes[i] = aCodes[i]; - rResult.mpRangeCodes = pCodes; - rResult.mnRangeCount = nCount / 2; - return true; + sal_uLong nLength = 0; + const unsigned char* pCmap = GetTable( "cmap", &nLength ); + if( pCmap && (nLength > 0) ) + if( ParseCMAP( pCmap, nLength, rResult ) ) + return true; + return false; } bool FreetypeFont::GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const |