diff options
author | Khaled Hosny <khaled@aliftype.com> | 2022-09-05 22:36:20 +0200 |
---|---|---|
committer | خالد حسني <khaled@aliftype.com> | 2022-09-06 15:09:57 +0200 |
commit | 394655636307de3ba3c4b2d52f3c1abf4b900e18 (patch) | |
tree | 5e898736ca4f3b715aa7320d2e0c62898b3e2e8f /vcl/unx/generic | |
parent | 12b89902036dba8d457c3e03080a4db50b99adcb (diff) |
vcl: Drop unused SalGraphics::CreateFontSubset() argument
pWidths is always nullptr.
Change-Id: I1c666f146865786269e9513cbb6c8ffdc7df96e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139461
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@aliftype.com>
Diffstat (limited to 'vcl/unx/generic')
-rw-r--r-- | vcl/unx/generic/fontmanager/fontmanager.cxx | 23 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/font.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/freetypetextrender.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/print/genpspgraphics.cxx | 2 |
4 files changed, 2 insertions, 28 deletions
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx index 4ee863a3a401..e0131081481b 100644 --- a/vcl/unx/generic/fontmanager/fontmanager.cxx +++ b/vcl/unx/generic/fontmanager/fontmanager.cxx @@ -945,7 +945,6 @@ bool PrintFontManager::createFontSubset( const OUString& rOutFile, const sal_GlyphId* pGlyphIds, const sal_uInt8* pNewEncoding, - sal_Int32* pWidths, int nGlyphs ) { @@ -1022,7 +1021,7 @@ bool PrintFontManager::createFontSubset( const bool bOK = rInfo.CreateFontSubset( FontType::TYPE1_PFB, pOutFile, pGlyphSetName, - aRequestedGlyphIds, pEnc, nGlyphs, pWidths ); + aRequestedGlyphIds, pEnc, nGlyphs); fclose( pOutFile ); // For OTC, values from hhea or OS2 are better psp::PrintFontInfo aFontInfo; @@ -1051,26 +1050,6 @@ bool PrintFontManager::createFontSubset( rInfo.m_aFontBBox = tools::Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) ); rInfo.m_nCapHeight = yMax; // Well ... - if (pWidths) - { - // fill in glyph advance widths - std::unique_ptr<sal_uInt16[]> pMetrics = GetTTSimpleGlyphMetrics( pTTFont, - pGID, - nGlyphs, - false/*bVertical*/ ); - if( pMetrics ) - { - for( int i = 0; i < nGlyphs; i++ ) - pWidths[pOldIndex[i]] = pMetrics[i]; - pMetrics.reset(); - } - else - { - CloseTTFont( pTTFont ); - return false; - } - } - bool bSuccess = ( SFErrCodes::Ok == CreateTTFromTTGlyphs( pTTFont, aToFile.getStr(), pGID, diff --git a/vcl/unx/generic/gdi/font.cxx b/vcl/unx/generic/gdi/font.cxx index f0d714758d0f..bf0ca5c98ffb 100644 --- a/vcl/unx/generic/gdi/font.cxx +++ b/vcl/unx/generic/gdi/font.cxx @@ -86,13 +86,12 @@ bool X11SalGraphics::CreateFontSubset( const vcl::font::PhysicalFontFace* pFont, const sal_GlyphId* pGlyphIds, const sal_uInt8* pEncoding, - sal_Int32* pWidths, int nGlyphCount, FontSubsetInfo& rInfo ) { return mxTextRenderImpl->CreateFontSubset(rToFile, pFont, - pGlyphIds, pEncoding, pWidths, nGlyphCount, rInfo); + pGlyphIds, pEncoding, nGlyphCount, rInfo); } const void* X11SalGraphics::GetEmbedFontData(const vcl::font::PhysicalFontFace* pFont, tools::Long* pDataLen) diff --git a/vcl/unx/generic/gdi/freetypetextrender.cxx b/vcl/unx/generic/gdi/freetypetextrender.cxx index f4b4abe30785..555bd2586eb9 100644 --- a/vcl/unx/generic/gdi/freetypetextrender.cxx +++ b/vcl/unx/generic/gdi/freetypetextrender.cxx @@ -132,7 +132,6 @@ bool FreeTypeTextRenderImpl::CreateFontSubset( const vcl::font::PhysicalFontFace* pFont, const sal_GlyphId* pGlyphIds, const sal_uInt8* pEncoding, - sal_Int32* pWidths, int nGlyphCount, FontSubsetInfo& rInfo ) @@ -150,7 +149,6 @@ bool FreeTypeTextRenderImpl::CreateFontSubset( rToFile, pGlyphIds, pEncoding, - pWidths, nGlyphCount ); return bSuccess; } diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx index 5d30288be282..6632c4f077e1 100644 --- a/vcl/unx/generic/print/genpspgraphics.cxx +++ b/vcl/unx/generic/print/genpspgraphics.cxx @@ -320,7 +320,6 @@ bool GenPspGraphics::CreateFontSubset( const vcl::font::PhysicalFontFace* pFont, const sal_GlyphId* pGlyphIds, const sal_uInt8* pEncoding, - sal_Int32* pWidths, int nGlyphCount, FontSubsetInfo& rInfo ) @@ -338,7 +337,6 @@ bool GenPspGraphics::CreateFontSubset( rToFile, pGlyphIds, pEncoding, - pWidths, nGlyphCount ); return bSuccess; } |