summaryrefslogtreecommitdiff
path: root/vcl/inc/textrender.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-01-27 00:20:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-01-30 12:28:04 +0000
commita548059718082f9a0823645e92246c98e5d07c24 (patch)
tree22c58f7b7a62cde63a576041190c99d209f24298 /vcl/inc/textrender.hxx
parent9565480cc6b58e22db762a8cad69e210e38d0a7c (diff)
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. (cherry picked from commit 5183910a90e97cafc3cfaaad40acdaec0b792f6d) Conflicts: vcl/inc/cairotextrender.hxx vcl/inc/textrender.hxx vcl/inc/unx/salgdi.h vcl/source/gdi/pdfwriter_impl.cxx Change-Id: Id4205a1cd45ba6a0a5facee1e39f70c3535e7dd4 Reviewed-on: https://gerrit.libreoffice.org/14205 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/inc/textrender.hxx')
-rw-r--r--vcl/inc/textrender.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/inc/textrender.hxx b/vcl/inc/textrender.hxx
index f4dcc8358cb1..8c46a28022ea 100644
--- a/vcl/inc/textrender.hxx
+++ b/vcl/inc/textrender.hxx
@@ -58,7 +58,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,
sal_Int32* pWidths,