summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@aliftype.com>2022-09-05 21:50:05 +0200
committerخالد حسني <khaled@aliftype.com>2022-09-06 15:08:34 +0200
commit70e97793769baaa8e0fbb8d8d3949655c4aeb654 (patch)
treeb1bee2ca218c34694738dc34c0b90c56f0969b29 /vcl
parent789b517819495a9efff5538de7e8e5106fc64f81 (diff)
vcl: Drop now unused SalGraphics::GetGlyphWidths()
Change-Id: Iec8974d6fc67d9d599c5e92aa325225963da0021 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139459 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/headless/svptext.cxx8
-rw-r--r--vcl/inc/headless/svpgdi.hxx4
-rw-r--r--vcl/inc/qt5/QtGraphics.hxx3
-rw-r--r--vcl/inc/quartz/salgdi.h5
-rw-r--r--vcl/inc/salgdi.hxx15
-rw-r--r--vcl/inc/textrender.hxx5
-rw-r--r--vcl/inc/unx/fontmanager.hxx4
-rw-r--r--vcl/inc/unx/freetypetextrender.hxx5
-rw-r--r--vcl/inc/unx/genpspgraphics.h8
-rw-r--r--vcl/inc/unx/salgdi.h6
-rw-r--r--vcl/inc/win/salgdi.h4
-rw-r--r--vcl/qt5/QtGraphics_Text.cxx9
-rw-r--r--vcl/quartz/salgdi.cxx26
-rw-r--r--vcl/source/gdi/salgdilayout.cxx46
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx53
-rw-r--r--vcl/unx/generic/gdi/font.cxx8
-rw-r--r--vcl/unx/generic/gdi/freetypetextrender.cxx8
-rw-r--r--vcl/unx/generic/print/genpspgraphics.cxx17
-rw-r--r--vcl/win/gdi/salfont.cxx28
19 files changed, 0 insertions, 262 deletions
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index d702ec89a5ca..269061ea831d 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -84,14 +84,6 @@ void SvpSalGraphics::FreeEmbedFontData( const void* pData, tools::Long nLen )
m_aTextRenderImpl.FreeEmbedFontData(pData, nLen);
}
-void SvpSalGraphics::GetGlyphWidths( const vcl::font::PhysicalFontFace* pFont,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- Ucs2UIntMap& rUnicodeEnc )
-{
- m_aTextRenderImpl.GetGlyphWidths(pFont, bVertical, rWidths, rUnicodeEnc);
-}
-
std::unique_ptr<GenericSalLayout> SvpSalGraphics::GetTextLayout(int nFallbackLevel)
{
return m_aTextRenderImpl.GetTextLayout(nFallbackLevel);
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index a63e7f289abf..83db19878f4d 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -87,10 +87,6 @@ public:
) override;
virtual const void* GetEmbedFontData(const vcl::font::PhysicalFontFace*, tools::Long* pDataLen) override;
virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
- virtual void GetGlyphWidths( const vcl::font::PhysicalFontFace*,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- Ucs2UIntMap& rUnicodeEnc ) override;
virtual std::unique_ptr<GenericSalLayout>
GetTextLayout(int nFallbackLevel) override;
virtual void DrawTextLayout( const GenericSalLayout& ) override;
diff --git a/vcl/inc/qt5/QtGraphics.hxx b/vcl/inc/qt5/QtGraphics.hxx
index fed7c2cb88f0..d7b25a9a150a 100644
--- a/vcl/inc/qt5/QtGraphics.hxx
+++ b/vcl/inc/qt5/QtGraphics.hxx
@@ -241,9 +241,6 @@ public:
tools::Long* pDataLen) override;
virtual void FreeEmbedFontData(const void* pData, tools::Long nDataLen) override;
- virtual void GetGlyphWidths(const vcl::font::PhysicalFontFace*, bool bVertical,
- std::vector<sal_Int32>& rWidths, Ucs2UIntMap& rUnicodeEnc) override;
-
virtual std::unique_ptr<GenericSalLayout> GetTextLayout(int nFallbackLevel) override;
virtual void DrawTextLayout(const GenericSalLayout&) override;
};
diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h
index 6ec586ac1bdd..e2bd63306158 100644
--- a/vcl/inc/quartz/salgdi.h
+++ b/vcl/inc/quartz/salgdi.h
@@ -566,11 +566,6 @@ public:
// frees the font data again
virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
- virtual void GetGlyphWidths( const vcl::font::PhysicalFontFace*,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- Ucs2UIntMap& rUnicodeEnc ) override;
-
virtual std::unique_ptr<GenericSalLayout>
GetTextLayout(int nFallbackLevel) override;
virtual void DrawTextLayout( const GenericSalLayout& ) override;
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index a050e4588042..4b2304ac8efd 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -63,7 +63,6 @@ typedef struct TTGlobalFontInfo_ TTGlobalFontInfo;
}
typedef sal_Unicode sal_Ucs; // TODO: use sal_UCS4 instead of sal_Unicode
-typedef std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap;
// note: if you add any new methods to class SalGraphics using coordinates
// make sure they have a corresponding protected pure virtual method
@@ -192,16 +191,6 @@ public:
// free the font data again
virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) = 0;
- // get the same widths as in CreateFontSubset
- // in case of an embeddable font also fill the mapping
- // between unicode and glyph id
- // leave widths vector and mapping untouched in case of failure
- virtual void GetGlyphWidths(
- const vcl::font::PhysicalFontFace* pFont,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- Ucs2UIntMap& rUnicodeEnc ) = 0;
-
virtual std::unique_ptr<GenericSalLayout>
GetTextLayout(int nFallbackLevel) = 0;
virtual void DrawTextLayout( const GenericSalLayout& ) = 0;
@@ -663,10 +652,6 @@ protected:
std::unique_ptr<vcl::WidgetDrawInterface> m_pWidgetDraw;
vcl::WidgetDrawInterface* forWidget() { return m_pWidgetDraw ? m_pWidgetDraw.get() : this; }
- static void GetGlyphWidths(const vcl::AbstractTrueTypeFont& rTTF,
- const vcl::font::PhysicalFontFace& rFontFace, bool bVertical,
- std::vector<sal_Int32>& rWidths, Ucs2UIntMap& rUnicodeEnc);
-
static bool CreateTTFfontSubset(vcl::AbstractTrueTypeFont& aTTF, const OString& rSysPath,
const bool bVertical, const sal_GlyphId* pGlyphIds,
const sal_uInt8* pEncoding, sal_Int32* pGlyphWidths,
diff --git a/vcl/inc/textrender.hxx b/vcl/inc/textrender.hxx
index 9e6fcc95cbd2..5d27b4e86238 100644
--- a/vcl/inc/textrender.hxx
+++ b/vcl/inc/textrender.hxx
@@ -53,11 +53,6 @@ public:
virtual const void* GetEmbedFontData(const vcl::font::PhysicalFontFace*, tools::Long* pDataLen) = 0;
virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) = 0;
- virtual void GetGlyphWidths(
- const vcl::font::PhysicalFontFace*,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- Ucs2UIntMap& rUnicodeEnc ) = 0;
virtual std::unique_ptr<GenericSalLayout>
GetTextLayout(int nFallbackLevel) = 0;
diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx
index 7483a86e3d95..cea59cda9d0c 100644
--- a/vcl/inc/unx/fontmanager.hxx
+++ b/vcl/inc/unx/fontmanager.hxx
@@ -285,10 +285,6 @@ public:
sal_Int32* pWidths,
int nGlyphs
);
- void getGlyphWidths( const vcl::font::PhysicalFontFace* pFace,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- std::map< sal_Unicode, sal_uInt32 >& rUnicodeEnc );
// font administration functions
diff --git a/vcl/inc/unx/freetypetextrender.hxx b/vcl/inc/unx/freetypetextrender.hxx
index 994edb5eb3e7..e154585e7dd4 100644
--- a/vcl/inc/unx/freetypetextrender.hxx
+++ b/vcl/inc/unx/freetypetextrender.hxx
@@ -58,11 +58,6 @@ public:
virtual const void* GetEmbedFontData(const vcl::font::PhysicalFontFace*, tools::Long* pDataLen) override;
virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
- virtual void GetGlyphWidths(
- const vcl::font::PhysicalFontFace*,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- Ucs2UIntMap& rUnicodeEnc ) override;
virtual std::unique_ptr<GenericSalLayout>
GetTextLayout(int nFallbackLevel) override;
diff --git a/vcl/inc/unx/genpspgraphics.h b/vcl/inc/unx/genpspgraphics.h
index 0588e8354032..252573a02ae4 100644
--- a/vcl/inc/unx/genpspgraphics.h
+++ b/vcl/inc/unx/genpspgraphics.h
@@ -67,10 +67,6 @@ public:
static bool AddTempDevFontHelper(vcl::font::PhysicalFontCollection* pFontCollection,
std::u16string_view rFileURL,
const OUString& rFontName);
- static void GetGlyphWidthsHelper(const vcl::font::PhysicalFontFace*,
- bool bVertical,
- std::vector<sal_Int32>& rWidths,
- Ucs2UIntMap& rUnicodeEnc);
static const void * GetEmbedFontDataHelper(const vcl::font::PhysicalFontFace*, tools::Long* pDataLen);
static void FreeEmbedFontDataHelper(const void* pData, tools::Long nLen);
@@ -103,10 +99,6 @@ public:
FontSubsetInfo& rInfo ) override;
virtual const void* GetEmbedFontData(const vcl::font::PhysicalFontFace*, tools::Long* pDataLen) override;
virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
- virtual void GetGlyphWidths( const vcl::font::PhysicalFontFace*,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- Ucs2UIntMap& rUnicodeEnc ) override;
virtual std::unique_ptr<GenericSalLayout>
GetTextLayout(int nFallbackLevel) override;
virtual void DrawTextLayout( const GenericSalLayout& ) override;
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index a2f4ceae9f56..cb8d551c6ead 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -134,12 +134,6 @@ public:
virtual const void* GetEmbedFontData(const vcl::font::PhysicalFontFace*, tools::Long* pDataLen) override;
virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
- virtual void GetGlyphWidths(
- const vcl::font::PhysicalFontFace*,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- Ucs2UIntMap& rUnicodeEnc ) override;
-
virtual std::unique_ptr<GenericSalLayout>
GetTextLayout(int nFallbackLevel) override;
virtual void DrawTextLayout( const GenericSalLayout& ) override;
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index b107308ec10b..605f07ad9ec8 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -376,10 +376,6 @@ public:
virtual const void* GetEmbedFontData(const vcl::font::PhysicalFontFace*, tools::Long* pDataLen) override;
// frees the font data again
virtual void FreeEmbedFontData( const void* pData, tools::Long nDataLen ) override;
- virtual void GetGlyphWidths( const vcl::font::PhysicalFontFace*,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- Ucs2UIntMap& rUnicodeEnc ) override;
virtual std::unique_ptr<GenericSalLayout>
GetTextLayout(int nFallbackLevel) override;
diff --git a/vcl/qt5/QtGraphics_Text.cxx b/vcl/qt5/QtGraphics_Text.cxx
index 03db69dbed6e..2ee3d9a71569 100644
--- a/vcl/qt5/QtGraphics_Text.cxx
+++ b/vcl/qt5/QtGraphics_Text.cxx
@@ -270,15 +270,6 @@ const void* QtGraphics::GetEmbedFontData(const vcl::font::PhysicalFontFace*,
void QtGraphics::FreeEmbedFontData(const void* /*pData*/, tools::Long /*nDataLen*/) {}
-void QtGraphics::GetGlyphWidths(const vcl::font::PhysicalFontFace* pFontFace, bool bVertical,
- std::vector<sal_Int32>& rWidths, Ucs2UIntMap& rUnicodeEnc)
-{
- const QtFontFace* pQtFontFace = static_cast<const QtFontFace*>(pFontFace);
- const QRawFont aRawFont(QRawFont::fromFont(pQtFontFace->CreateFont()));
- QtTrueTypeFont aTTF(*pQtFontFace, aRawFont);
- SalGraphics::GetGlyphWidths(aTTF, *pFontFace, bVertical, rWidths, rUnicodeEnc);
-}
-
namespace
{
class QtCommonSalLayout : public GenericSalLayout
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index f7bc60904114..e27b2f1c2c32 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -699,32 +699,6 @@ bool AquaSalGraphics::GetRawFontData( const vcl::font::PhysicalFontFace* pFontDa
return true;
}
-void AquaSalGraphics::GetGlyphWidths( const vcl::font::PhysicalFontFace* pFontData, bool bVertical,
- std::vector< sal_Int32 >& rGlyphWidths, Ucs2UIntMap& rUnicodeEnc )
-{
- rGlyphWidths.clear();
- rUnicodeEnc.clear();
-
- std::vector<unsigned char> aBuffer;
- if( !GetRawFontData( pFontData, aBuffer, nullptr ) )
- return;
-
- // TODO: modernize psprint's horrible fontsubset C-API
- // this probably only makes sense after the switch to another SCM
- // that can preserve change history after file renames
-
- // use the font subsetter to get the widths
- TrueTypeFont* pSftFont = nullptr;
- SFErrCodes nRC = ::OpenTTFontBuffer(static_cast<void*>(aBuffer.data()), aBuffer.size(), 0, &pSftFont,
- pFontData->GetFontCharMap());
- if( nRC != SFErrCodes::Ok )
- return;
-
- SalGraphics::GetGlyphWidths(*pSftFont, *pFontData, bVertical, rGlyphWidths, rUnicodeEnc);
-
- ::CloseTTFont( pSftFont );
-}
-
const void* AquaSalGraphics::GetEmbedFontData(const vcl::font::PhysicalFontFace*, tools::Long* /*pDataLen*/)
{
return nullptr;
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index f0cdcc2dd1a7..6267c5a705d7 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -928,52 +928,6 @@ OUString SalGraphics::getRenderBackendName() const
return OUString();
}
-void SalGraphics::GetGlyphWidths(const vcl::AbstractTrueTypeFont& rTTF,
- const vcl::font::PhysicalFontFace& rFontFace, const bool bVertical,
- std::vector<sal_Int32>& rWidths, Ucs2UIntMap& rUnicodeEnc)
-{
- rWidths.clear();
- rUnicodeEnc.clear();
-
- const int nGlyphCount = rTTF.glyphCount();
- if (nGlyphCount <= 0)
- return;
-
- FontCharMapRef xFCMap = rFontFace.GetFontCharMap();
- if (!xFCMap.is() || !xFCMap->GetCharCount())
- {
- SAL_WARN("vcl.fonts", "no charmap");
- return;
- }
-
- rWidths.resize(nGlyphCount);
- std::vector<sal_uInt16> aGlyphIds(nGlyphCount);
- for (int i = 0; i < nGlyphCount; i++)
- aGlyphIds[i] = static_cast<sal_uInt16>(i);
-
- std::unique_ptr<sal_uInt16[]> pGlyphMetrics
- = GetTTSimpleGlyphMetrics(&rTTF, aGlyphIds.data(), nGlyphCount, bVertical);
- if (pGlyphMetrics)
- {
- for (int i = 0; i < nGlyphCount; ++i)
- rWidths[i] = pGlyphMetrics[i];
- pGlyphMetrics.reset();
- }
-
- int nCharCount = xFCMap->GetCharCount();
- sal_uInt32 nChar = xFCMap->GetFirstChar();
- for (; --nCharCount >= 0; nChar = xFCMap->GetNextChar(nChar))
- {
- if (nChar > 0xFFFF)
- continue;
-
- sal_Ucs nUcsChar = static_cast<sal_Ucs>(nChar);
- sal_uInt32 nGlyph = xFCMap->GetGlyphIndex(nUcsChar);
- if (nGlyph > 0)
- rUnicodeEnc[nUcsChar] = nGlyph;
- }
-}
-
bool SalGraphics::CreateTTFfontSubset(vcl::AbstractTrueTypeFont& rTTF, const OString& rSysPath,
const bool bVertical, const sal_GlyphId* pGlyphIds,
const sal_uInt8* pEncoding, sal_Int32* pGlyphWidths,
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index 4ede52817180..4ee863a3a401 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -1081,57 +1081,4 @@ bool PrintFontManager::createFontSubset(
return bSuccess;
}
-void PrintFontManager::getGlyphWidths( const vcl::font::PhysicalFontFace* pFace,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- std::map< sal_Unicode, sal_uInt32 >& rUnicodeEnc )
-{
- PrintFont* pFont = getFont( pFace->GetFontId() );
- if (!pFont)
- return;
- TrueTypeFont* pTTFont = nullptr;
- OString aFromFile = getFontFile( *pFont );
- if( OpenTTFontFile( aFromFile.getStr(), pFont->m_nCollectionEntry, &pTTFont ) != SFErrCodes::Ok )
- return;
- int nGlyphs = pTTFont->glyphCount();
- if (nGlyphs > 0)
- {
- rWidths.resize(nGlyphs);
- std::vector<sal_uInt16> aGlyphIds(nGlyphs);
- for (int i = 0; i < nGlyphs; i++)
- aGlyphIds[i] = sal_uInt16(i);
- std::unique_ptr<sal_uInt16[]> pMetrics = GetTTSimpleGlyphMetrics(pTTFont,
- aGlyphIds.data(),
- nGlyphs,
- bVertical);
- if (pMetrics)
- {
- for (int i = 0; i< nGlyphs; i++)
- rWidths[i] = pMetrics[i];
- pMetrics.reset();
- rUnicodeEnc.clear();
- }
-
- // fill the unicode map
- FontCharMapRef xFontCharMap = pFace->GetFontCharMap();
- for (sal_uInt32 cOld = 0;;)
- {
- // get next unicode covered by font
- const sal_uInt32 c = xFontCharMap->GetNextChar(cOld);
- if (c == cOld)
- break;
- cOld = c;
-#if 1 // TODO: remove when sal_Unicode covers all of unicode
- if (c > sal_Unicode(~0))
- break;
-#endif
- // get the matching glyph index
- const sal_GlyphId aGlyphId = xFontCharMap->GetGlyphIndex(c);
- // update the requested map
- rUnicodeEnc[static_cast<sal_Unicode>(c)] = aGlyphId;
- }
- }
- CloseTTFont(pTTFont);
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/gdi/font.cxx b/vcl/unx/generic/gdi/font.cxx
index 57ff99a1c10a..f0d714758d0f 100644
--- a/vcl/unx/generic/gdi/font.cxx
+++ b/vcl/unx/generic/gdi/font.cxx
@@ -105,12 +105,4 @@ void X11SalGraphics::FreeEmbedFontData( const void* pData, tools::Long nLen )
mxTextRenderImpl->FreeEmbedFontData(pData, nLen);
}
-void X11SalGraphics::GetGlyphWidths( const vcl::font::PhysicalFontFace* pFont,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- Ucs2UIntMap& rUnicodeEnc )
-{
- mxTextRenderImpl->GetGlyphWidths(pFont, bVertical, rWidths, rUnicodeEnc);
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/gdi/freetypetextrender.cxx b/vcl/unx/generic/gdi/freetypetextrender.cxx
index 61782cf22462..f4b4abe30785 100644
--- a/vcl/unx/generic/gdi/freetypetextrender.cxx
+++ b/vcl/unx/generic/gdi/freetypetextrender.cxx
@@ -165,12 +165,4 @@ void FreeTypeTextRenderImpl::FreeEmbedFontData( const void* pData, tools::Long n
GenPspGraphics::FreeEmbedFontDataHelper(pData, nLen);
}
-void FreeTypeTextRenderImpl::GetGlyphWidths( const vcl::font::PhysicalFontFace* pFont,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- Ucs2UIntMap& rUnicodeEnc )
-{
- GenPspGraphics::GetGlyphWidthsHelper(pFont, bVertical, rWidths, rUnicodeEnc);
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx
index b398206e9094..5d30288be282 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -343,23 +343,6 @@ bool GenPspGraphics::CreateFontSubset(
return bSuccess;
}
-void GenPspGraphics::GetGlyphWidths( const vcl::font::PhysicalFontFace* pFont,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- Ucs2UIntMap& rUnicodeEnc )
-{
- GenPspGraphics::GetGlyphWidthsHelper(pFont, bVertical, rWidths, rUnicodeEnc);
-}
-
-void GenPspGraphics::GetGlyphWidthsHelper(const vcl::font::PhysicalFontFace* pFont,
- bool bVertical,
- std::vector<sal_Int32>& rWidths,
- Ucs2UIntMap& rUnicodeEnc)
-{
- psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
- rMgr.getGlyphWidths( pFont, bVertical, rWidths, rUnicodeEnc );
-}
-
FontAttributes GenPspGraphics::Info2FontAttributes( const psp::FastPrintFontInfo& rInfo )
{
FontAttributes aDFA;
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 200780426a5b..0d0cc316e611 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -1599,32 +1599,4 @@ void WinSalGraphics::FreeEmbedFontData( const void* pData, tools::Long /*nLen*/
delete[] static_cast<char const *>(pData);
}
-void WinSalGraphics::GetGlyphWidths( const vcl::font::PhysicalFontFace* pFont,
- bool bVertical,
- std::vector< sal_Int32 >& rWidths,
- Ucs2UIntMap& rUnicodeEnc )
-{
- ScopedFontHDC aScopedFontHDC(*this, *pFont);
- HDC hDC = aScopedFontHDC.hdc();
- if (!hDC)
- return;
-
- // get raw font file data
- const RawFontData xRawFontData(hDC);
- if( !xRawFontData.get() )
- return;
-
- // open font file
- sal_uInt32 nFaceNum = 0;
- if( !*xRawFontData.get() ) // TTC candidate
- nFaceNum = ~0U; // indicate "TTC font extracts only"
-
- ScopedTrueTypeFont aSftTTF;
- SFErrCodes nRC = aSftTTF.open(xRawFontData.get(), xRawFontData.size(), nFaceNum, pFont->GetFontCharMap());
- if( nRC != SFErrCodes::Ok )
- return;
-
- SalGraphics::GetGlyphWidths(*aSftTTF.get(), *pFont, bVertical, rWidths, rUnicodeEnc);
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */