[DRE-commits] [ruby-rbpdf] 13/25: Fix makefont.rb

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Feb 14 15:56:45 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository ruby-rbpdf.

commit 666062aeb956090d8fd162aa9833098ce4e21a3c
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date:   Tue Feb 9 13:01:35 2016 -0200

    Fix makefont.rb
---
 ...kefont.rb-write-output-to-input-directory.patch | 39 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 40 insertions(+)

diff --git a/debian/patches/0004-makefont.rb-write-output-to-input-directory.patch b/debian/patches/0004-makefont.rb-write-output-to-input-directory.patch
new file mode 100644
index 0000000..e79891e
--- /dev/null
+++ b/debian/patches/0004-makefont.rb-write-output-to-input-directory.patch
@@ -0,0 +1,39 @@
+From: Antonio Terceiro <terceiro at softwarelivre.org>
+Date: Tue, 9 Feb 2016 13:00:08 -0200
+Subject: makefont.rb: write output to input directory
+
+---
+ rbpdf-font/lib/fonts/ttf2ufm/makefont.rb | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/rbpdf-font/lib/fonts/ttf2ufm/makefont.rb b/rbpdf-font/lib/fonts/ttf2ufm/makefont.rb
+index 16b9ca4..ec9176a 100644
+--- a/rbpdf-font/lib/fonts/ttf2ufm/makefont.rb
++++ b/rbpdf-font/lib/fonts/ttf2ufm/makefont.rb
+@@ -161,14 +161,14 @@ def MakeFont(fontfile, fmfile, embedded=true, enc='cp1252', patch={})
+       size2 = pos - size1
+       file = file[0, size1 + size2]
+     end
+-    basename = basename.downcase
++    output = File.join(File.dirname(fmfile), basename.downcase)
+     if Object.const_defined?(:Zlib)
+-      cmp = basename + '.z'
++      cmp = output + '.z'
+       SaveToFile(cmp, Zlib::Deflate.deflate(file, 9), 'b')
+       s << '  font[:file]=\'' + cmp + "'\n"
+       print "Font file compressed (" + cmp + ")\n"
+       unless cidtogidmap.empty?
+-        cmp = basename + '.ctg.z'
++        cmp = output + '.ctg.z'
+         SaveToFile(cmp, Zlib::Deflate.deflate(cidtogidmap, 9), 'b')
+         print "CIDToGIDMap created and compressed (" + cmp + ")\n"
+         s << '  font[:ctg]=\'' + cmp + "'\n"
+@@ -177,7 +177,7 @@ def MakeFont(fontfile, fmfile, embedded=true, enc='cp1252', patch={})
+       s << 'file=\'' + File.basename(fontfile, ".*") + "'\n"
+       print "Notice: font file could not be compressed (zlib extension not available)\n"
+       if !cidtogidmap.empty?
+-        cmp = basename + '.ctg'
++        cmp = output + '.ctg'
+         f = open(cmp, 'wb')
+         f.write(cidtogidmap)
+         f.close
diff --git a/debian/patches/series b/debian/patches/series
index 0770bdf..767d9f1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001-Skip-tests-related-to-alpha-channel-support-in-rmagi.patch
 0002-Relax-dependency-on-htmlentities.patch
 0003-rbpdf-font-test-test-font-path-contents-not-exact-lo.patch
+0004-makefont.rb-write-output-to-input-directory.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rbpdf.git



More information about the Pkg-ruby-extras-commits mailing list