[Libreoffice-commits] core.git: vcl/generic vcl/headless vcl/inc vcl/quartz vcl/source vcl/unx vcl/win
Caolán McNamara
caolanm at redhat.com
Tue Jan 27 07:23:10 PST 2015
vcl/generic/fontmanager/fontmanager.cxx | 4 ++--
vcl/generic/print/genpspgraphics.cxx | 4 ++--
vcl/headless/svptext.cxx | 4 ++--
vcl/inc/cairotextrender.hxx | 4 ++--
vcl/inc/fontmanager.hxx | 4 ++--
vcl/inc/generic/genpspgraphics.h | 4 ++--
vcl/inc/headless/svpgdi.hxx | 4 ++--
vcl/inc/quartz/salgdi.h | 4 ++--
vcl/inc/salgdi.hxx | 4 ++--
vcl/inc/textrender.hxx | 4 ++--
vcl/inc/unx/salgdi.h | 4 ++--
vcl/quartz/salgdicommon.cxx | 8 ++++----
vcl/source/gdi/pdfwriter_impl.cxx | 5 ++++-
vcl/unx/generic/gdi/cairotextrender.cxx | 4 ++--
vcl/unx/generic/gdi/salgdi3.cxx | 4 ++--
vcl/win/source/gdi/salgdi3.cxx | 2 +-
16 files changed, 35 insertions(+), 32 deletions(-)
New commits:
commit 911f3a122a6adc36ac25940b29627b26405e2379
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jan 26 21:22:26 2015 +0000
these are const inputs, we fill widths from pGlyphIds via pEncoding
Change-Id: I32d8bbc5083223b540f76a928de505d611627957
Reviewed-on: https://gerrit.libreoffice.org/14196
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index c6ee6ec..cf74934 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -1923,8 +1923,8 @@ bool PrintFontManager::createFontSubset(
FontSubsetInfo& rInfo,
fontID nFont,
const OUString& rOutFile,
- sal_GlyphId* pGlyphIds,
- sal_uInt8* pNewEncoding,
+ const sal_GlyphId* pGlyphIds,
+ const sal_uInt8* pNewEncoding,
sal_Int32* pWidths,
int nGlyphs,
bool bVertical
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx
index 0ad6b25..a2cdf8b 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -988,8 +988,8 @@ SalLayout* GenPspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
bool GenPspGraphics::CreateFontSubset(
const OUString& rToFile,
const PhysicalFontFace* pFont,
- sal_GlyphId* pGlyphIds,
- sal_uInt8* pEncoding,
+ const sal_GlyphId* pGlyphIds,
+ const sal_uInt8* pEncoding,
sal_Int32* pWidths,
int nGlyphCount,
FontSubsetInfo& rInfo
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index 3b0cf05..b075399 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -296,8 +296,8 @@ bool SvpSalGraphics::AddTempDevFont( PhysicalFontCollection*,
bool SvpSalGraphics::CreateFontSubset(
const OUString& rToFile,
const PhysicalFontFace* pFont,
- sal_GlyphId* pGlyphIds,
- sal_uInt8* pEncoding,
+ const sal_GlyphId* pGlyphIds,
+ const sal_uInt8* pEncoding,
sal_Int32* pWidths,
int nGlyphCount,
FontSubsetInfo& rInfo
diff --git a/vcl/inc/cairotextrender.hxx b/vcl/inc/cairotextrender.hxx
index 87eede0..e47b7b3 100644
--- a/vcl/inc/cairotextrender.hxx
+++ b/vcl/inc/cairotextrender.hxx
@@ -103,8 +103,8 @@ public:
virtual bool CreateFontSubset(
const OUString& rToFile,
const PhysicalFontFace*,
- sal_GlyphId* pGlyphIDs,
- sal_uInt8* pEncoding,
+ const sal_GlyphId* pGlyphIDs,
+ const sal_uInt8* pEncoding,
sal_Int32* pWidths,
int nGlyphs,
FontSubsetInfo& rInfo) SAL_OVERRIDE;
diff --git a/vcl/inc/fontmanager.hxx b/vcl/inc/fontmanager.hxx
index 1de2e70..2cf6e6a 100644
--- a/vcl/inc/fontmanager.hxx
+++ b/vcl/inc/fontmanager.hxx
@@ -481,8 +481,8 @@ public:
bool createFontSubset( FontSubsetInfo&,
fontID nFont,
const OUString& rOutFile,
- sal_GlyphId* pGlyphIDs,
- sal_uInt8* pNewEncoding,
+ const sal_GlyphId* pGlyphIDs,
+ const sal_uInt8* pNewEncoding,
sal_Int32* pWidths,
int nGlyphs,
bool bVertical = false
diff --git a/vcl/inc/generic/genpspgraphics.h b/vcl/inc/generic/genpspgraphics.h
index 27e4a62..2982c83 100644
--- a/vcl/inc/generic/genpspgraphics.h
+++ b/vcl/inc/generic/genpspgraphics.h
@@ -102,8 +102,8 @@ public:
virtual bool CreateFontSubset( const OUString& rToFile,
const PhysicalFontFace*,
- sal_GlyphId* pGlyphIDs,
- sal_uInt8* pEncoding,
+ const sal_GlyphId* pGlyphIDs,
+ const sal_uInt8* pEncoding,
sal_Int32* pWidths,
int nGlyphs,
FontSubsetInfo& rInfo ) SAL_OVERRIDE;
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index 4608140..d429b80 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -121,8 +121,8 @@ public:
virtual bool AddTempDevFont( PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) SAL_OVERRIDE;
virtual bool CreateFontSubset( const OUString& rToFile,
const PhysicalFontFace*,
- sal_GlyphId* pGlyphIds,
- sal_uInt8* pEncoding,
+ const sal_GlyphId* pGlyphIds,
+ const sal_uInt8* pEncoding,
sal_Int32* pWidths,
int nGlyphs,
FontSubsetInfo& rInfo
diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h
index eb55e96..737f8d4 100644
--- a/vcl/inc/quartz/salgdi.h
+++ b/vcl/inc/quartz/salgdi.h
@@ -367,8 +367,8 @@ public:
// as "undefined character"
virtual bool CreateFontSubset( const OUString& rToFile,
const PhysicalFontFace* pFont,
- sal_GlyphId* pGlyphIds,
- sal_uInt8* pEncoding,
+ const sal_GlyphId* pGlyphIds,
+ const sal_uInt8* pEncoding,
sal_Int32* pWidths,
int nGlyphs,
FontSubsetInfo& rInfo // out parameter
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 6e5e800..114a5c2 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -174,8 +174,8 @@ public:
virtual bool CreateFontSubset(
const OUString& rToFile,
const PhysicalFontFace* pFont,
- sal_GlyphId* pGlyphIDs,
- sal_uInt8* pEncoding,
+ const sal_GlyphId* pGlyphIDs,
+ const sal_uInt8* pEncoding,
sal_Int32* pWidths,
int nGlyphs,
FontSubsetInfo& rInfo ) = 0;
diff --git a/vcl/inc/textrender.hxx b/vcl/inc/textrender.hxx
index 60925bb..a3a8876 100644
--- a/vcl/inc/textrender.hxx
+++ b/vcl/inc/textrender.hxx
@@ -53,8 +53,8 @@ public:
virtual bool CreateFontSubset(
const OUString& rToFile,
const PhysicalFontFace*,
- sal_GlyphId* pGlyphIDs,
- sal_uInt8* pEncoding,
+ const sal_GlyphId* pGlyphIDs,
+ const sal_uInt8* pEncoding,
sal_Int32* pWidths,
int nGlyphs,
FontSubsetInfo& rInfo) = 0;
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 97a5ac2..baa7de7 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -126,8 +126,8 @@ public:
virtual bool CreateFontSubset(
const OUString& rToFile,
const PhysicalFontFace*,
- sal_GlyphId* pGlyphIDs,
- sal_uInt8* pEncoding,
+ const sal_GlyphId* pGlyphIDs,
+ const sal_uInt8* pEncoding,
sal_Int32* pWidths,
int nGlyphs,
FontSubsetInfo& rInfo ) SAL_OVERRIDE;
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 5e53a25..4ee18f5 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -178,10 +178,10 @@ static void AddPolyPolygonToPath( CGMutablePathRef xPath,
}
bool AquaSalGraphics::CreateFontSubset( const OUString& rToFile,
- const PhysicalFontFace* pFontData,
- sal_GlyphId* pGlyphIds, sal_uInt8* pEncoding,
- sal_Int32* pGlyphWidths, int nGlyphCount,
- FontSubsetInfo& rInfo )
+ const PhysicalFontFace* pFontData,
+ const sal_GlyphId* pGlyphIds, const sal_uInt8* pEncoding,
+ sal_Int32* pGlyphWidths, int nGlyphCount,
+ FontSubsetInfo& rInfo )
{
// TODO: move more of the functionality here into the generic subsetter code
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 1c798ea..ec373aa 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3008,7 +3008,10 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const PhysicalFo
if( aUnicodeMap.find( c ) != aUnicodeMap.end() )
pWidths[ c ] = aGlyphWidths[ aUnicodeMap[ c ] ];
}
-
+ //TODO: surely this is utterly broken because aGlyphIds is just all zeros, if we
+ //had the right glyphids here then I imagine we could replace pDuWidths with
+ //pWidths and remove pWidths assignment above. i.e. start with the glyph ids
+ //and map those to unicode rather than try and reverse map them ?
pGraphics->CreateFontSubset( aTmpName, pFont, aGlyphIds, pEncoding, pDuWidths, 256, aInfo );
osl_removeFile( aTmpName.pData );
}
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 4b1005d..4d018b4 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -596,8 +596,8 @@ SystemFontData CairoTextRender::GetSysFontData( int nFallbackLevel ) const
bool CairoTextRender::CreateFontSubset(
const OUString& rToFile,
const PhysicalFontFace* pFont,
- sal_GlyphId* pGlyphIds,
- sal_uInt8* pEncoding,
+ const sal_GlyphId* pGlyphIds,
+ const sal_uInt8* pEncoding,
sal_Int32* pWidths,
int nGlyphCount,
FontSubsetInfo& rInfo
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
index 2e345a9..622f778 100644
--- a/vcl/unx/generic/gdi/salgdi3.cxx
+++ b/vcl/unx/generic/gdi/salgdi3.cxx
@@ -166,8 +166,8 @@ SystemFontData X11SalGraphics::GetSysFontData( int nFallbackLevel ) const
bool X11SalGraphics::CreateFontSubset(
const OUString& rToFile,
const PhysicalFontFace* pFont,
- sal_GlyphId* pGlyphIds,
- sal_uInt8* pEncoding,
+ const sal_GlyphId* pGlyphIds,
+ const sal_uInt8* pEncoding,
sal_Int32* pWidths,
int nGlyphCount,
FontSubsetInfo& rInfo
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 407e721..4e76036 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -2442,7 +2442,7 @@ int ScopedTrueTypeFont::open(void * pBuffer, sal_uInt32 nLen,
}
bool WinSalGraphics::CreateFontSubset( const OUString& rToFile,
- const PhysicalFontFace* pFont, sal_GlyphId* pGlyphIds, sal_uInt8* pEncoding,
+ const PhysicalFontFace* pFont, const sal_GlyphId* pGlyphIds, const sal_uInt8* pEncoding,
sal_Int32* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rInfo )
{
// TODO: use more of the central font-subsetting code, move stuff there if needed
More information about the Libreoffice-commits
mailing list