summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/glyphs
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2019-08-28 12:50:22 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2019-09-05 19:24:10 +0200
commit467387ed2f4f226b580da7a674c2ed88365c976a (patch)
tree9f8b51505678350db316ce463c5602ea07d70e8c /vcl/unx/generic/glyphs
parentfc0119d0afb7775663762d972b6d5dbc15581c66 (diff)
Merge GetFontCodeRanges() into GetFontCharMap()
Change-Id: I61d8edf0be492c1c06274c11ac5d2e65415525a9 Reviewed-on: https://gerrit.libreoffice.org/78638 Tested-by: Jenkins Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/unx/generic/glyphs')
-rw-r--r--vcl/unx/generic/glyphs/freetype_glyphcache.cxx20
1 files changed, 5 insertions, 15 deletions
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index ed473e9c198a..d58c5bedc097 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -704,8 +704,11 @@ const FontCharMapRef& FreetypeFontInfo::GetFontCharMap()
// get the charmap and cache it
CmapResult aCmapResult;
- bool bOK = GetFontCodeRanges( aCmapResult );
- if( bOK )
+ aCmapResult.mbSymbolic = IsSymbolFont();
+
+ sal_uLong nLength = 0;
+ const unsigned char* pCmap = GetTable("cmap", &nLength);
+ if (pCmap && (nLength > 0) && ParseCMAP(pCmap, nLength, aCmapResult))
{
FontCharMapRef xFontCharMap( new FontCharMap ( aCmapResult ) );
mxFontCharMap = xFontCharMap;
@@ -719,19 +722,6 @@ const FontCharMapRef& FreetypeFontInfo::GetFontCharMap()
return mxFontCharMap;
}
-// TODO: merge into method GetFontCharMap()
-bool FreetypeFontInfo::GetFontCodeRanges( CmapResult& rResult ) const
-{
- rResult.mbSymbolic = IsSymbolFont();
-
- 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
{
bool bRet = false;