[Libreoffice-commits] core.git: 2 commits - vcl/generic vcl/headless vcl/inc vcl/quartz vcl/source vcl/unx vcl/win
Michael Stahl
mstahl at redhat.com
Tue Jan 27 05:47:33 PST 2015
vcl/generic/fontmanager/fontmanager.cxx | 25 ++++++++++++++++++++++-
vcl/generic/print/genpspgraphics.cxx | 8 +++----
vcl/headless/svptext.cxx | 4 +--
vcl/inc/cairotextrender.hxx | 2 -
vcl/inc/fontmanager.hxx | 7 +++++-
vcl/inc/generic/genpspgraphics.h | 6 +++--
vcl/inc/headless/svpgdi.hxx | 2 -
vcl/inc/quartz/salgdi.h | 2 -
vcl/inc/salgdi.hxx | 4 ++-
vcl/inc/textrender.hxx | 2 -
vcl/inc/unx/salgdi.h | 2 -
vcl/inc/win/salgdi.h | 2 -
vcl/quartz/salgdi.cxx | 2 -
vcl/source/gdi/pdfwriter_impl.cxx | 34 ++++++++++++++++++++++++++++----
vcl/unx/generic/gdi/cairotextrender.cxx | 4 +--
vcl/unx/generic/gdi/salgdi3.cxx | 4 +--
vcl/win/source/gdi/salgdi3.cxx | 2 -
17 files changed, 85 insertions(+), 27 deletions(-)
New commits:
commit 5cb69b6653097b0772e112f0979fc9ee7da18fa8
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Jan 27 13:52:54 2015 +0100
vcl: PDF export: AFM may contain 16-bit code points, unlikely to work...
Change-Id: If7d67cd92a878bd1cfcc838ec9b7c9303975b255
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 950bd96..1c798ea 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3125,6 +3125,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
if(it->second == -1)
continue;
sal_Int32 nCode = (sal_Int32)(it->second & 0x000000ff);
+ SAL_WARN_IF(nCode != it->second, "vcl.gdi", "emitEmbeddedFont: FIXME: cannot handle Type 1 font with code points > 256");
//We're not doing this right here. We have taken a unicode-to-font_index map
//and are trying to generate a font_index-to-unicode mapping from it
//Which assumes that there is a 1-to-1 mapping there, but that might not be
commit 5183910a90e97cafc3cfaaad40acdaec0b792f6d
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Jan 27 00:20:58 2015 +0100
rhbz#1177022: vcl: fix PDF embedding of Type 1 fonts
Problem is that for the "CM Typewriter" font the Width for "space" (32)
is exported as 0 instead of 525, which is the correct value in the AFM.
The reason is that PDFWriterImpl::emitEmbeddedFont() has various arrays
to map from font code points to Unicode code points, and there are
duplicate mappings, so the 160->32 mapping overrides 32->32.
The PrintFontManager::PrintFont::readAfmMetrics() actually creates a
Unicode to font code mapping (which may legitimately be n:1) that is
then inverted; add an additional hack to store a set of "preferred"
Unicodes so that PDFWriterImpl can pick the right Unicode.
Presumably the code that is stored explicitly via "C" or "CH" in the
AFM should take priority over more generic mappings.
Change-Id: Id4205a1cd45ba6a0a5facee1e39f70c3535e7dd4
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index 736513a..c6ee6ec 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -289,6 +289,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider,
}
m_aEncodingVector.clear();
+ m_aEncodingVectorPriority.clear();
// fill in global info
// PSName
@@ -502,7 +503,10 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider,
{
pUnicodes[i] = pChar->code + 0xf000;
if( bFillEncodingvector )
+ {
m_aEncodingVector[ pUnicodes[i] ] = pChar->code;
+ m_aEncodingVectorPriority.insert(pUnicodes[i]);
+ }
continue;
}
@@ -563,7 +567,10 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider,
{
m_pMetrics->m_aMetrics[ pUnicodes[i] ] = aMetric;
if( bFillEncodingvector )
+ {
m_aEncodingVector[ pUnicodes[i] ] = pChar->code;
+ m_aEncodingVectorPriority.insert(pUnicodes[i]);
+ }
}
else if( pChar->name )
{
@@ -591,13 +598,21 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider,
::std::pair< std::unordered_multimap< sal_uInt8, sal_Unicode >::const_iterator,
std::unordered_multimap< sal_uInt8, sal_Unicode >::const_iterator >
aCodes = rManager.getUnicodeFromAdobeCode( pChar->code );
+ bool bFirst = true;
while( aCodes.first != aCodes.second )
{
if( (*aCodes.first).second != 0 )
{
m_pMetrics->m_aMetrics[ (*aCodes.first).second ] = aMetric;
if( bFillEncodingvector )
+ {
m_aEncodingVector[ (*aCodes.first).second ] = pChar->code;
+ if (bFirst) // arbitrarily prefer the first one
+ {
+ m_aEncodingVectorPriority.insert((*aCodes.first).second);
+ bFirst = false;
+ }
+ }
}
++aCodes.first;
}
@@ -611,7 +626,10 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider,
m_pMetrics->m_aMetrics[ code ] = aMetric;
// maybe should try to find the name in the convtabs ?
if( bFillEncodingvector )
+ {
m_aEncodingVector[ code ] = pChar->code;
+ m_aEncodingVectorPriority.insert(code);
+ }
}
}
}
@@ -2138,7 +2156,7 @@ void PrintFontManager::getGlyphWidths( fontID nFont,
}
}
-const std::map< sal_Unicode, sal_Int32 >* PrintFontManager::getEncodingMap( fontID nFont, const std::map< sal_Unicode, OString >** pNonEncoded ) const
+const std::map< sal_Unicode, sal_Int32 >* PrintFontManager::getEncodingMap( fontID nFont, const std::map< sal_Unicode, OString >** pNonEncoded, std::set<sal_Unicode> const** ppPriority ) const
{
PrintFont* pFont = getFont( nFont );
if( !pFont || pFont->m_eType != fonttype::Type1 )
@@ -2150,6 +2168,11 @@ const std::map< sal_Unicode, sal_Int32 >* PrintFontManager::getEncodingMap( font
if( pNonEncoded )
*pNonEncoded = pFont->m_aNonEncoded.size() ? &pFont->m_aNonEncoded : NULL;
+ if (ppPriority)
+ {
+ *ppPriority = &pFont->m_aEncodingVectorPriority;
+ }
+
return pFont->m_aEncodingVector.size() ? &pFont->m_aEncodingVector : NULL;
}
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx
index a67e1c2..0ad6b25 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -1013,7 +1013,7 @@ bool GenPspGraphics::CreateFontSubset(
return bSuccess;
}
-const Ucs2SIntMap* GenPspGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded )
+const Ucs2SIntMap* GenPspGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded, std::set<sal_Unicode> const** ppPriority)
{
// in this context the pFont->GetFontId() is a valid PSP
// font since they are the only ones left after the PDF
@@ -1021,7 +1021,7 @@ const Ucs2SIntMap* GenPspGraphics::GetFontEncodingVector( const PhysicalFontFace
// which this method was created). The correct way would
// be to have the GlyphCache search for the PhysicalFontFace pFont
psp::fontID aFont = pFont->GetFontId();
- return GenPspGraphics::DoGetFontEncodingVector( aFont, pNonEncoded );
+ return GenPspGraphics::DoGetFontEncodingVector( aFont, pNonEncoded, ppPriority );
}
void GenPspGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
@@ -1038,7 +1038,7 @@ void GenPspGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
GenPspGraphics::DoGetGlyphWidths( aFont, bVertical, rWidths, rUnicodeEnc );
}
-const Ucs2SIntMap* GenPspGraphics::DoGetFontEncodingVector( fontID aFont, const Ucs2OStrMap** pNonEncoded )
+const Ucs2SIntMap* GenPspGraphics::DoGetFontEncodingVector( fontID aFont, const Ucs2OStrMap** pNonEncoded, std::set<sal_Unicode> const** ppPriority)
{
psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
@@ -1050,7 +1050,7 @@ const Ucs2SIntMap* GenPspGraphics::DoGetFontEncodingVector( fontID aFont, const
return NULL;
}
- return rMgr.getEncodingMap( aFont, pNonEncoded );
+ return rMgr.getEncodingMap( aFont, pNonEncoded, ppPriority );
}
void GenPspGraphics::DoGetGlyphWidths( psp::fontID aFont,
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index 84a35e1..3b0cf05 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -321,7 +321,7 @@ bool SvpSalGraphics::CreateFontSubset(
return bSuccess;
}
-const Ucs2SIntMap* SvpSalGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded )
+const Ucs2SIntMap* SvpSalGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded, std::set<sal_Unicode> const** ppPriority)
{
// in this context the pFont->GetFontId() is a valid PSP
// font since they are the only ones left after the PDF
@@ -329,7 +329,7 @@ const Ucs2SIntMap* SvpSalGraphics::GetFontEncodingVector( const PhysicalFontFace
// which this method was created). The correct way would
// be to have the GlyphCache search for the PhysicalFontFace pFont
psp::fontID aFont = pFont->GetFontId();
- return GenPspGraphics::DoGetFontEncodingVector( aFont, pNonEncoded );
+ return GenPspGraphics::DoGetFontEncodingVector(aFont, pNonEncoded, ppPriority);
}
const void* SvpSalGraphics::GetEmbedFontData(
diff --git a/vcl/inc/cairotextrender.hxx b/vcl/inc/cairotextrender.hxx
index d945968..87eede0 100644
--- a/vcl/inc/cairotextrender.hxx
+++ b/vcl/inc/cairotextrender.hxx
@@ -109,7 +109,7 @@ public:
int nGlyphs,
FontSubsetInfo& rInfo) SAL_OVERRIDE;
- virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded ) SAL_OVERRIDE;
+ virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded, std::set<sal_Unicode> const**) SAL_OVERRIDE;
virtual const void* GetEmbedFontData(
const PhysicalFontFace*,
const sal_Ucs* pUnicodes,
diff --git a/vcl/inc/fontmanager.hxx b/vcl/inc/fontmanager.hxx
index beec12a..1de2e70 100644
--- a/vcl/inc/fontmanager.hxx
+++ b/vcl/inc/fontmanager.hxx
@@ -202,7 +202,12 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
bool m_bHaveVerticalSubstitutedGlyphs;
bool m_bUserOverride;
+ /// mapping from unicode (well, UCS-2) to font code
std::map< sal_Unicode, sal_Int32 > m_aEncodingVector;
+ /// HACK for Type 1 fonts: if multiple UCS-2 codes map to the same
+ /// font code, this set contains the preferred one, i.e., the one that
+ /// is specified explicitly via "C" or "CH" in the AFM file
+ std::set<sal_Unicode> m_aEncodingVectorPriority;
std::map< sal_Unicode, OString > m_aNonEncoded;
explicit PrintFont( fonttype::type eType );
@@ -438,7 +443,7 @@ public:
// if ppNonEncoded is set and non encoded type1 glyphs exist
// then *ppNonEncoded is set to the mapping for nonencoded glyphs.
// the encoding vector contains -1 for non encoded glyphs
- const std::map< sal_Unicode, sal_Int32 >* getEncodingMap( fontID nFontID, const std::map< sal_Unicode, OString >** ppNonEncoded ) const;
+ const std::map< sal_Unicode, sal_Int32 >* getEncodingMap( fontID nFontID, const std::map< sal_Unicode, OString >** ppNonEncoded, std::set<sal_Unicode> const ** ppPriority ) const;
// evaluates copyright flags for TrueType fonts for printing/viewing
// type1 fonts do not have such a feature, so return for them is true
diff --git a/vcl/inc/generic/genpspgraphics.h b/vcl/inc/generic/genpspgraphics.h
index b4ac313..27e4a62 100644
--- a/vcl/inc/generic/genpspgraphics.h
+++ b/vcl/inc/generic/genpspgraphics.h
@@ -60,7 +60,8 @@ public:
// helper methods for sharing with X11SalGraphics
static const Ucs2SIntMap* DoGetFontEncodingVector( psp::fontID aFont,
- const Ucs2OStrMap** pNonEncoded );
+ const Ucs2OStrMap** pNonEncoded,
+ std::set<sal_Unicode> const** ppPriority);
static void DoGetGlyphWidths( psp::fontID aFont,
bool bVertical,
Int32Vector& rWidths,
@@ -107,7 +108,8 @@ public:
int nGlyphs,
FontSubsetInfo& rInfo ) SAL_OVERRIDE;
virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*,
- const Ucs2OStrMap** ppNonEncoded ) SAL_OVERRIDE;
+ const Ucs2OStrMap** ppNonEncoded,
+ std::set<sal_Unicode> const** ppPriority) SAL_OVERRIDE;
virtual const void* GetEmbedFontData( const PhysicalFontFace*,
const sal_Ucs* pUnicodes,
sal_Int32* pWidths,
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index dc0c62f..4608140 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -127,7 +127,7 @@ public:
int nGlyphs,
FontSubsetInfo& rInfo
) SAL_OVERRIDE;
- virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded ) SAL_OVERRIDE;
+ virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded, std::set<sal_Unicode> const** ) SAL_OVERRIDE;
virtual const void* GetEmbedFontData( const PhysicalFontFace*,
const sal_Ucs* pUnicodes,
sal_Int32* pWidths,
diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h
index 9c9c741..eb55e96 100644
--- a/vcl/inc/quartz/salgdi.h
+++ b/vcl/inc/quartz/salgdi.h
@@ -381,7 +381,7 @@ public:
// glyphs with only a name) exist it is set to the corresponding
// map for non encoded glyphs; the encoding vector contains -1
// as encoding for these cases
- virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded ) SAL_OVERRIDE;
+ virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded, std::set<sal_Unicode> const** ) SAL_OVERRIDE;
// GetEmbedFontData: gets the font data for a font marked
// embeddable by GetDevFontList or NULL in case of error
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index b42e0b4..6e5e800 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -34,6 +34,7 @@
#include "sallayout.hxx"
#include <map>
+#include <set>
class PhysicalFontCollection;
class SalBitmap;
@@ -188,7 +189,8 @@ public:
// as encoding for these cases
virtual const Ucs2SIntMap* GetFontEncodingVector(
const PhysicalFontFace*,
- const Ucs2OStrMap** ppNonEncoded ) = 0;
+ const Ucs2OStrMap** ppNonEncoded,
+ std::set<sal_Unicode> const** ppPriority) = 0;
// GetEmbedFontData: gets the font data for a font marked
// embeddable by GetDevFontList or NULL in case of error
diff --git a/vcl/inc/textrender.hxx b/vcl/inc/textrender.hxx
index 4a635c5..60925bb 100644
--- a/vcl/inc/textrender.hxx
+++ b/vcl/inc/textrender.hxx
@@ -59,7 +59,7 @@ public:
int nGlyphs,
FontSubsetInfo& rInfo) = 0;
- virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded ) = 0;
+ virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded, std::set<sal_Unicode> const** ppPriority) = 0;
virtual const void* GetEmbedFontData(
const PhysicalFontFace*,
const sal_Ucs* pUnicodes,
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 4486e8c..97a5ac2 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -132,7 +132,7 @@ public:
int nGlyphs,
FontSubsetInfo& rInfo ) SAL_OVERRIDE;
- virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded ) SAL_OVERRIDE;
+ virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded, std::set<sal_Unicode> const**) SAL_OVERRIDE;
virtual const void* GetEmbedFontData(
const PhysicalFontFace*,
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 5ff9530..d78b191 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -411,7 +411,7 @@ public:
// glyphs with only a name) exist it is set to the corresponding
// map for non encoded glyphs; the encoding vector contains -1
// as encoding for these cases
- virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded );
+ virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded, std::set<sal_Unicode> const** );
// GetEmbedFontData: gets the font data for a font marked
// embeddable by GetDevFontList or NULL in case of error
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index 49ad051..898e58d 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -730,7 +730,7 @@ void AquaSalGraphics::GetGlyphWidths( const PhysicalFontFace* pFontData, bool bV
}
const Ucs2SIntMap* AquaSalGraphics::GetFontEncodingVector(
- const PhysicalFontFace*, const Ucs2OStrMap** /*ppNonEncoded*/ )
+ const PhysicalFontFace*, const Ucs2OStrMap** /*ppNonEncoded*/, std::set<sal_Unicode> const** )
{
return NULL;
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 2affdd4..950bd96 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3104,7 +3104,9 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
assert(pGraphics);
// prepare font encoding
- const Ucs2SIntMap* pEncoding = pGraphics->GetFontEncodingVector( pFont, NULL );
+ std::set<sal_Unicode> const * pPriority(0);
+ const Ucs2SIntMap *const pEncoding =
+ pGraphics->GetFontEncodingVector( pFont, nullptr, &pPriority );
sal_Int32 nToUnicodeStream = 0;
sal_uInt8 nEncoding[256];
sal_Ucs nEncodedCodes[256];
@@ -3131,8 +3133,31 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
//Instead perhaps we could try and get the GetFontCharMap and loop
//over sal_UCS4 GetCharFromIndex( int nCharIndex ) const from 0 to 255
//to build it up
- if (nEncodedCodes[nCode] != 0)
- continue;
+ if (nEncoding[nCode] != 0)
+ {
+ // should not have 2 identical mappings
+ assert(nEncodedCodes[nCode] != it->first);
+ if (pPriority)
+ {
+ bool bExist = pPriority->find(nEncodedCodes[nCode]) != pPriority->end();
+ bool bIter = pPriority->find(it->first) != pPriority->end();
+ SAL_WARN_IF(bExist && bIter, "vcl.gdi", "both are preferred? odd...");
+ if (bExist)
+ {
+ continue;
+ }
+ // note: aUnicodes will contain the old one but that
+ // does not matter because there's nothing iterating it
+ }
+ else
+ {
+ // is this fallback important? let's prefer lower one.
+ // actually the map is sorted so just rely on that
+ assert(nEncodedCodes[nCode] < it->first);
+ SAL_WARN("vcl.gdi", "emitEmbeddedFont: ignoring code " << nCode << " mapping to " << it->first << " in favor of " << nEncodedCodes[nCode]);
+ continue;
+ }
+ }
nEncodedCodes[ nCode ] = it->first;
nEncoding[ nCode ] = static_cast<sal_uInt8>( nCode );
pEncToUnicodeIndex[ nCode ] = static_cast<sal_Int32>(aUnicodes.size());
@@ -7276,7 +7301,7 @@ bool PDFWriterImpl::registerGlyphs( int nGlyphs,
const Ucs2OStrMap* pNonEncoded = NULL;
if (!getReferenceDevice()->AcquireGraphics())
return false;
- pEncoding = pGraphics->GetFontEncodingVector( pCurrentFont, &pNonEncoded );
+ pEncoding = pGraphics->GetFontEncodingVector( pCurrentFont, &pNonEncoded, 0);
Ucs2SIntMap::const_iterator enc_it;
Ucs2OStrMap::const_iterator nonenc_it;
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 2e83c39..4b1005d 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -637,7 +637,7 @@ void CairoTextRender::FreeEmbedFontData( const void* pData, long nLen )
GenPspGraphics::DoFreeEmbedFontData( pData, nLen );
}
-const Ucs2SIntMap* CairoTextRender::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded )
+const Ucs2SIntMap* CairoTextRender::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded, std::set<sal_Unicode> const** ppPriority)
{
// in this context the pFont->GetFontId() is a valid PSP
// font since they are the only ones left after the PDF
@@ -645,7 +645,7 @@ const Ucs2SIntMap* CairoTextRender::GetFontEncodingVector( const PhysicalFontFac
// which this method was created). The correct way would
// be to have the GlyphCache search for the PhysicalFontFace pFont
psp::fontID aFont = pFont->GetFontId();
- return GenPspGraphics::DoGetFontEncodingVector( aFont, pNonEncoded );
+ return GenPspGraphics::DoGetFontEncodingVector(aFont, pNonEncoded, ppPriority);
}
void CairoTextRender::GetGlyphWidths( const PhysicalFontFace* pFont,
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
index 6f5eadf..2e345a9 100644
--- a/vcl/unx/generic/gdi/salgdi3.cxx
+++ b/vcl/unx/generic/gdi/salgdi3.cxx
@@ -187,9 +187,9 @@ void X11SalGraphics::FreeEmbedFontData( const void* pData, long nLen )
mpTextRenderImpl->FreeEmbedFontData(pData, nLen);
}
-const Ucs2SIntMap* X11SalGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded )
+const Ucs2SIntMap* X11SalGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded, std::set<sal_Unicode> const** ppPriority)
{
- return mpTextRenderImpl->GetFontEncodingVector(pFont, pNonEncoded);
+ return mpTextRenderImpl->GetFontEncodingVector(pFont, pNonEncoded, ppPriority);
}
void X11SalGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 763e2ea..407e721 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -2655,7 +2655,7 @@ void WinSalGraphics::FreeEmbedFontData( const void* pData, long /*nLen*/ )
delete[] reinterpret_cast<char*>(const_cast<void*>(pData));
}
-const Ucs2SIntMap* WinSalGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded )
+const Ucs2SIntMap* WinSalGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded, std::set<sal_Unicode> const**)
{
// TODO: even for builtin fonts we get here... why?
if( !pFont->IsEmbeddable() )
More information about the Libreoffice-commits
mailing list