diff options
author | joerg <joerg@pkgsrc.org> | 2013-07-16 21:28:43 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2013-07-16 21:28:43 +0000 |
commit | 28b3ff7a407f3c090d0f07227ccd7326173f3ca4 (patch) | |
tree | 9edcb99829516c2ed405e92db252cca7f7fbad27 /print | |
parent | c977e3cef80b2e02f91a4ff44515a556fddbfd0a (diff) | |
download | pkgsrc-28b3ff7a407f3c090d0f07227ccd7326173f3ca4.tar.gz |
Merge two patches already upstream:
- use a more compact encoding for reals by dropping trailing zeros after
the decimal point.
- ensure the BaseFont property of the standard PS fonts is preserved.
Bump revision.
Diffstat (limited to 'print')
-rw-r--r-- | print/podofo/Makefile | 3 | ||||
-rw-r--r-- | print/podofo/distinfo | 5 | ||||
-rw-r--r-- | print/podofo/patches/patch-src_base_PdfVariant.cpp | 30 | ||||
-rw-r--r-- | print/podofo/patches/patch-src_doc_PdfFontType1Base14.cpp | 37 | ||||
-rw-r--r-- | print/podofo/patches/patch-src_doc_PdfFontType1Base14.h | 13 |
5 files changed, 86 insertions, 2 deletions
diff --git a/print/podofo/Makefile b/print/podofo/Makefile index fb04837beb9..637398dd1cf 100644 --- a/print/podofo/Makefile +++ b/print/podofo/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.17 2013/07/05 21:12:45 joerg Exp $ +# $NetBSD: Makefile,v 1.18 2013/07/16 21:28:43 joerg Exp $ # DISTNAME= podofo-0.9.2 +PKGREVISION= 1 CATEGORIES= print MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=podofo/} diff --git a/print/podofo/distinfo b/print/podofo/distinfo index 6327d86785a..85eca082680 100644 --- a/print/podofo/distinfo +++ b/print/podofo/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.6 2013/07/05 21:12:45 joerg Exp $ +$NetBSD: distinfo,v 1.7 2013/07/16 21:28:43 joerg Exp $ SHA1 (podofo-0.9.2.tar.gz) = 8a6e27e17e0ed9f12e1a999cff66eae8eb97a4bc RMD160 (podofo-0.9.2.tar.gz) = 69bf1035f2466ba95208830038c6f8e303580a5b @@ -7,4 +7,7 @@ SHA1 (patch-aa) = 83740cf59f1c86b07e7ce498e19efe627c0b249e SHA1 (patch-ab) = 86ef3d5f6fced669cbeeae95890c046489467e69 SHA1 (patch-ac) = b184fa648407141a373451334790aada66cc2ae2 SHA1 (patch-src_base_PdfLocale.h) = ba209173509f1109d305765ae7dd56d8266a97d8 +SHA1 (patch-src_base_PdfVariant.cpp) = 849374c8111175cc8875bce0f0b7656bfd1ba5b3 +SHA1 (patch-src_doc_PdfFontType1Base14.cpp) = fa0452ad11e01a3706b9ad81d649dcc088493638 +SHA1 (patch-src_doc_PdfFontType1Base14.h) = 6467317f8b3818ec4da86e938f44b1d7eb4fd6af SHA1 (patch-test_CMakeLists.txt) = 846871dac995ff80544ad9096574eddd776e324f diff --git a/print/podofo/patches/patch-src_base_PdfVariant.cpp b/print/podofo/patches/patch-src_base_PdfVariant.cpp new file mode 100644 index 00000000000..75975a7fe0c --- /dev/null +++ b/print/podofo/patches/patch-src_base_PdfVariant.cpp @@ -0,0 +1,30 @@ +$NetBSD: patch-src_base_PdfVariant.cpp,v 1.1 2013/07/16 21:28:43 joerg Exp $ + +--- src/base/PdfVariant.cpp.orig 2011-04-19 17:34:25.000000000 +0000 ++++ src/base/PdfVariant.cpp +@@ -267,8 +267,24 @@ void PdfVariant::Write( PdfOutputDevice* + std::ostringstream oss; + PdfLocaleImbue(oss); + oss << std::fixed << m_Data.dNumber; ++ size_t len = oss.str().size(); + +- pDevice->Write( oss.str().c_str(), oss.str().size() ); ++ if( (eWriteMode & ePdfWriteMode_Compact) == ePdfWriteMode_Compact && ++ oss.str().find('.') != string::npos ) ++ { ++ const char *str = oss.str().c_str(); ++ while( str[len - 1] == '0' ) ++ --len; ++ if( str[len - 1] == '.' ) ++ --len; ++ if( len == 0 ) ++ { ++ pDevice->Write( "0", 1 ); ++ break; ++ } ++ } ++ ++ pDevice->Write( oss.str().c_str(), len ); + break; + } + case ePdfDataType_HexString: diff --git a/print/podofo/patches/patch-src_doc_PdfFontType1Base14.cpp b/print/podofo/patches/patch-src_doc_PdfFontType1Base14.cpp new file mode 100644 index 00000000000..eb378e2bff9 --- /dev/null +++ b/print/podofo/patches/patch-src_doc_PdfFontType1Base14.cpp @@ -0,0 +1,37 @@ +$NetBSD: patch-src_doc_PdfFontType1Base14.cpp,v 1.1 2013/07/16 21:28:43 joerg Exp $ + +--- src/doc/PdfFontType1Base14.cpp.orig 2010-10-21 17:09:00.000000000 +0000 ++++ src/doc/PdfFontType1Base14.cpp +@@ -31,7 +31,7 @@ PdfFontType1Base14::PdfFontType1Base14( + PdfVecObjects* pParent ) + : PdfFontSimple( pMetrics, pEncoding, pParent ) + { +- InitBase14Font(); ++ InitBase14Font( pMetrics ); + } + + // OC 13.08.2010 New: +@@ -39,7 +39,7 @@ PdfFontType1Base14::PdfFontType1Base14( + PdfObject* pObject ) + : PdfFontSimple( pMetrics, pEncoding, pObject ) + { +- InitBase14Font(); ++ InitBase14Font( pMetrics ); + } + + PdfFontType1Base14::~PdfFontType1Base14() +@@ -52,12 +52,12 @@ PdfFontType1Base14::~PdfFontType1Base14( + kausik : April 12th 2010 + This is the font dictionary. It gets added to the page resources dictionary of the pdf. + */ +-void PdfFontType1Base14::InitBase14Font( ) ++void PdfFontType1Base14::InitBase14Font( PdfFontMetrics* pMetrics ) + { + PdfVariant var; + + this->GetObject()->GetDictionary().AddKey( PdfName::KeySubtype, PdfName("Type1")); +- this->GetObject()->GetDictionary().AddKey("BaseFont", this->GetBaseFont() ); ++ this->GetObject()->GetDictionary().AddKey("BaseFont", PdfName( pMetrics->GetFontname() ) ); + + m_pEncoding->AddToDictionary( this->GetObject()->GetDictionary() ); // Add encoding key + // pDescriptor->GetDictionary().AddKey( "FontName", this->GetBaseFont() ); diff --git a/print/podofo/patches/patch-src_doc_PdfFontType1Base14.h b/print/podofo/patches/patch-src_doc_PdfFontType1Base14.h new file mode 100644 index 00000000000..0eb3dac4180 --- /dev/null +++ b/print/podofo/patches/patch-src_doc_PdfFontType1Base14.h @@ -0,0 +1,13 @@ +$NetBSD: patch-src_doc_PdfFontType1Base14.h,v 1.1 2013/07/16 21:28:43 joerg Exp $ + +--- src/doc/PdfFontType1Base14.h.orig 2013-07-08 13:31:23.631273082 +0000 ++++ src/doc/PdfFontType1Base14.h +@@ -66,7 +66,7 @@ class PdfFontType1Base14 : public PdfFon + virtual void EmbedFontFile( PdfObject* pDescriptor ); + + private: +- void InitBase14Font(); ++ void InitBase14Font( PdfFontMetrics* pMetrics ); + + }; + |