summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-07-30 14:59:19 +0000
committerخالد حسني <khaled@libreoffice.org>2023-07-30 20:45:18 +0200
commit3e563f6ed42224e5c7fbb11428604a7719e178af (patch)
tree8ab987d6160104a4ac81431d010d65f276f78cf8
parent3a01df55db376ecbed0d89ebb4dd9d2d2f4b520f (diff)
Drop freshly unused PrintFontManager
Change-Id: If4cec80eaf1301907d144ecb8518a4de5acdeefb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155070 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
-rw-r--r--vcl/inc/unx/fontmanager.hxx13
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx67
2 files changed, 0 insertions, 80 deletions
diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx
index a7817652d9ae..1a9ef6e3be21 100644
--- a/vcl/inc/unx/fontmanager.hxx
+++ b/vcl/inc/unx/fontmanager.hxx
@@ -96,7 +96,6 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
// font attributes
OUString m_aFamilyName;
std::vector<OUString> m_aAliases;
- OUString m_aPSName;
OUString m_aStyleName;
FontFamily m_eFamilyStyle;
FontItalic m_eItalic;
@@ -104,9 +103,6 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
FontWeight m_eWeight;
FontPitch m_ePitch;
rtl_TextEncoding m_aEncoding;
- int m_nAscend;
- int m_nDescend;
- int m_nLeading;
int m_nDirectory; // atom containing system dependent path
OString m_aFontFile; // relative to directory
@@ -202,9 +198,6 @@ public:
// routines to get font info in small pieces
- // get a specific fonts PSName name
- OUString getPSName( fontID nFontID );
-
// get a specific fonts system dependent filename
OString getFontFileSysPath( fontID nFontID ) const
{
@@ -217,12 +210,6 @@ public:
// get the ttc face variation
int getFontFaceVariation( fontID nFontID ) const;
- // get a specific fonts ascend
- int getFontAscend( fontID nFontID );
-
- // get a specific fonts descent
- int getFontDescend( fontID nFontID );
-
// font administration functions
/* system dependent font matching
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index d7b6a211df13..1927071bb802 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -87,9 +87,6 @@ PrintFontManager::PrintFont::PrintFont()
, m_eWeight(WEIGHT_DONTKNOW)
, m_ePitch(PITCH_DONTKNOW)
, m_aEncoding(RTL_TEXTENCODING_DONTKNOW)
-, m_nAscend(0)
-, m_nDescend(0)
-, m_nLeading(0)
, m_nDirectory(0)
, m_nCollectionEntry(0)
, m_nVariationEntry(0)
@@ -563,12 +560,6 @@ bool PrintFontManager::analyzeSfntFile( PrintFont& rFont ) const
if( !aInfo.usubfamily.isEmpty() )
rFont.m_aStyleName = aInfo.usubfamily;
- SAL_WARN_IF( aInfo.psname.isEmpty(), "vcl.fonts", "No PostScript name in font:" << aFile );
-
- rFont.m_aPSName = !aInfo.psname.isEmpty() ?
- OStringToOUString(aInfo.psname, aEncoding) :
- rFont.m_aFamilyName; // poor font does not have a postscript name
-
rFont.m_eFamilyStyle = matchFamilyName(rFont.m_aFamilyName);
switch( aInfo.weight )
@@ -610,33 +601,6 @@ bool PrintFontManager::analyzeSfntFile( PrintFont& rFont ) const
rFont.m_aEncoding = aInfo.microsoftSymbolEncoded ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UCS2;
- if( aInfo.ascender && aInfo.descender )
- {
- rFont.m_nLeading = aInfo.linegap;
- rFont.m_nAscend = aInfo.ascender;
- rFont.m_nDescend = -aInfo.descender;
- }
- else if( aInfo.typoAscender && aInfo.typoDescender )
- {
- rFont.m_nLeading = aInfo.typoLineGap;
- rFont.m_nAscend = aInfo.typoAscender;
- rFont.m_nDescend = -aInfo.typoDescender;
- }
- else if( aInfo.winAscent && aInfo.winDescent )
- {
- rFont.m_nAscend = aInfo.winAscent;
- rFont.m_nDescend = aInfo.winDescent;
- rFont.m_nLeading = rFont.m_nAscend + rFont.m_nDescend - 1000;
- }
-
- // last try: font bounding box
- if( rFont.m_nAscend == 0 )
- rFont.m_nAscend = aInfo.yMax;
- if( rFont.m_nDescend == 0 )
- rFont.m_nDescend = -aInfo.yMin;
- if( rFont.m_nLeading == 0 )
- rFont.m_nLeading = 15 * (rFont.m_nAscend+rFont.m_nDescend) / 100;
-
CloseTTFont( pTTFont );
bSuccess = true;
}
@@ -846,35 +810,4 @@ OString PrintFontManager::getFontFile(const PrintFont& rFont) const
return aPath;
}
-OUString PrintFontManager::getPSName( fontID nFontID )
-{
- PrintFont* pFont = getFont( nFontID );
- if (pFont && pFont->m_aPSName.isEmpty())
- {
- analyzeSfntFile(*pFont);
- }
-
- return pFont ? pFont->m_aPSName : OUString();
-}
-
-int PrintFontManager::getFontAscend( fontID nFontID )
-{
- PrintFont* pFont = getFont( nFontID );
- if (pFont && pFont->m_nAscend == 0 && pFont->m_nDescend == 0)
- {
- analyzeSfntFile(*pFont);
- }
- return pFont ? pFont->m_nAscend : 0;
-}
-
-int PrintFontManager::getFontDescend( fontID nFontID )
-{
- PrintFont* pFont = getFont( nFontID );
- if (pFont && pFont->m_nAscend == 0 && pFont->m_nDescend == 0)
- {
- analyzeSfntFile(*pFont);
- }
- return pFont ? pFont->m_nDescend : 0;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */