summaryrefslogtreecommitdiff
path: root/vcl/source/glyphs
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-07-28 09:02:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-07-28 09:02:37 +0100
commitb74f17642d0bcd94b938241ba8a6ce3ee09af757 (patch)
treea7b7346524d82be536f0bcf72756169f74b710d2 /vcl/source/glyphs
parenta2c7a85db679aa537524a772ce7989980398fe34 (diff)
callcatcher: ditch various unused methods
Diffstat (limited to 'vcl/source/glyphs')
-rw-r--r--vcl/source/glyphs/gcach_ftyp.cxx82
-rw-r--r--vcl/source/glyphs/gcach_ftyp.hxx1
2 files changed, 0 insertions, 83 deletions
diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx
index 79bcb608fb5f..c38bc3701e61 100644
--- a/vcl/source/glyphs/gcach_ftyp.cxx
+++ b/vcl/source/glyphs/gcach_ftyp.cxx
@@ -617,88 +617,6 @@ void FreetypeManager::AddFontFile( const rtl::OString& rNormalizedName,
// -----------------------------------------------------------------------
-long FreetypeManager::AddFontDir( const String& rUrlName )
-{
- osl::Directory aDir( rUrlName );
- osl::FileBase::RC rcOSL = aDir.open();
- if( rcOSL != osl::FileBase::E_None )
- return 0;
-
- long nCount = 0;
-
- osl::DirectoryItem aDirItem;
- rtl_TextEncoding theEncoding = osl_getThreadTextEncoding();
- while( (rcOSL = aDir.getNextItem( aDirItem, 20 )) == osl::FileBase::E_None )
- {
- osl::FileStatus aFileStatus( osl_FileStatus_Mask_FileURL );
- rcOSL = aDirItem.getFileStatus( aFileStatus );
-
- ::rtl::OUString aUSytemPath;
- OSL_VERIFY( osl::FileBase::E_None
- == osl::FileBase::getSystemPathFromFileURL( aFileStatus.getFileURL(), aUSytemPath ));
- ::rtl::OString aCFileName = rtl::OUStringToOString( aUSytemPath, theEncoding );
- const char* pszFontFileName = aCFileName.getStr();
-
- FT_FaceRec_* aFaceFT = NULL;
- for( int nFaceNum = 0, nMaxFaces = 1; nFaceNum < nMaxFaces; ++nFaceNum )
- {
- FT_Error rcFT = FT_New_Face( aLibFT, pszFontFileName, nFaceNum, &aFaceFT );
- if( (rcFT != FT_Err_Ok) || (aFaceFT == NULL) )
- break;
-
- if( !FT_IS_SCALABLE( aFaceFT ) ) // ignore non-scalabale fonts
- continue;
-
- nMaxFaces = aFaceFT->num_faces;
-
- ImplDevFontAttributes aDFA;
-
- // TODO: prefer unicode names if available
- // TODO: prefer locale specific names if available?
- if ( aFaceFT->family_name )
- aDFA.maName = String::CreateFromAscii( aFaceFT->family_name );
-
- if ( aFaceFT->style_name )
- aDFA.maStyleName = String::CreateFromAscii( aFaceFT->style_name );
-
- aDFA.mbSymbolFlag = false;
- for( int i = aFaceFT->num_charmaps; --i >= 0; )
- {
- const FT_CharMap aCM = aFaceFT->charmaps[i];
-#if (FTVERSION < 2000)
- if( aCM->encoding == FT_ENCODING_NONE )
-#else
- if( (aCM->platform_id == TT_PLATFORM_MICROSOFT)
- && (aCM->encoding_id == TT_MS_ID_SYMBOL_CS) )
-#endif
- aDFA.mbSymbolFlag = true;
- }
-
- // TODO: extract better font characterization data from font
- aDFA.meFamily = FAMILY_DONTKNOW;
- aDFA.mePitch = FT_IS_FIXED_WIDTH( aFaceFT ) ? PITCH_FIXED : PITCH_VARIABLE;
- aDFA.meWidthType = WIDTH_DONTKNOW;
- aDFA.meWeight = FT_STYLE_FLAG_BOLD & aFaceFT->style_flags ? WEIGHT_BOLD : WEIGHT_NORMAL;
- aDFA.meItalic = FT_STYLE_FLAG_ITALIC & aFaceFT->style_flags ? ITALIC_NORMAL : ITALIC_NONE;
-
- aDFA.mnQuality = 0;
- aDFA.mbOrientation= true;
- aDFA.mbDevice = true;
- aDFA.mbSubsettable= false;
- aDFA.mbEmbeddable = false;
-
- FT_Done_Face( aFaceFT );
- AddFontFile( aCFileName, nFaceNum, ++mnNextFontId, aDFA, NULL );
- ++nCount;
- }
- }
-
- aDir.close();
- return nCount;
-}
-
-// -----------------------------------------------------------------------
-
void FreetypeManager::AnnounceFonts( ImplDevFontList* pToAdd ) const
{
for( FontList::const_iterator it = maFontList.begin(); it != maFontList.end(); ++it )
diff --git a/vcl/source/glyphs/gcach_ftyp.hxx b/vcl/source/glyphs/gcach_ftyp.hxx
index 9cbe49cd495e..95e6a3a0b526 100644
--- a/vcl/source/glyphs/gcach_ftyp.hxx
+++ b/vcl/source/glyphs/gcach_ftyp.hxx
@@ -162,7 +162,6 @@ public:
FreetypeManager();
~FreetypeManager();
- long AddFontDir( const String& rUrlName );
void AddFontFile( const rtl::OString& rNormalizedName,
int nFaceNum, sal_IntPtr nFontId, const ImplDevFontAttributes&,
const ExtraKernInfo* );