Description: use system fonts when possible
 Upstream ships embedded copies of several truetype fonts. Some are available in Debian.
0805_manual_hash.patch
 These copies have been removed from the Debian source package, and system
 fonts are used instead.
Author: Cédric Boutillier <boutil@debian.org>
Last-Update: 2019-01-07

--- a/manual/text/single_usage.rb
+++ b/manual/text/single_usage.rb
@@ -18,7 +18,7 @@
 filename = File.basename(__FILE__).gsub('.rb', '.pdf')
 Prawn::ManualBuilder::Example.generate(filename) do
   # Using a TTF font file
-  font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf") do
+  font("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf") do
     text 'Written with the DejaVu Sans TTF font.'
   end
   move_down 20
--- a/manual/text/line_wrapping.rb
+++ b/manual/text/line_wrapping.rb
@@ -29,7 +29,7 @@
     "nearer your destination the more you're slip#{nbsp}sliding away."
   move_down 20
 
-  font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf", size: 16) do
+  font("/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf", size: 16) do
     long_text = "No word boundaries:\n更可怕的是，"\
       '同质化竞争对手可以按照URL中后面这个ID来遍历您的DB中的内容，'\
       '写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事，'\
--- a/manual/text/right_to_left_text.rb
+++ b/manual/text/right_to_left_text.rb
@@ -21,7 +21,7 @@
   # set the direction document-wide
   self.text_direction = :rtl
 
-  font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf", size: 16) do
+  font("/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf", size: 16) do
     long_text = '写个小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事写个'\
       '小爬虫把你的页面上的关键信息顺次爬下来也不是什么难事写个小爬虫把你的页'\
       '面上的关键信息顺次爬下来也不是什么难事写个小'
--- a/manual/text/registering_families.rb
+++ b/manual/text/registering_families.rb
@@ -15,7 +15,7 @@
   # Registering a single external font
   font_families.update(
     'DejaVu Sans' => {
-      normal: "#{Prawn::DATADIR}/fonts/DejaVuSans.ttf"
+      normal: "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
     }
   )
 
--- a/manual/text/utf8.rb
+++ b/manual/text/utf8.rb
@@ -20,7 +20,7 @@
   text 'For full internationalized text support, we need to use external fonts:'
   move_down 20
 
-  font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf") do
+  font("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf") do
     text 'ὕαλον ϕαγεῖν δύναμαι· τοῦτο οὔ με βλάπτει.'
     text 'There you go.'
   end
--- a/manual/text/fallback_fonts.rb
+++ b/manual/text/fallback_fonts.rb
@@ -8,7 +8,7 @@
 
 filename = File.basename(__FILE__).gsub('.rb', '.pdf')
 Prawn::ManualBuilder::Example.generate(filename) do
-  file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
+  file = "/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf"
   font_families['Kai'] = {
     normal: { file: file, font: 'Kai' }
   }
--- a/spec/prawn/images/png_spec.rb
+++ b/spec/prawn/images/png_spec.rb
@@ -219,7 +219,7 @@
     let(:alpha_data_filename) { "#{Prawn::DATADIR}/images/dice.alpha" }
     let(:img_data) { File.binread("#{Prawn::DATADIR}/images/dice.png") }
 
-    it 'reads the attributes from the header chunk correctly' do
+    xit 'reads the attributes from the header chunk correctly' do
       png = described_class.new(img_data)
 
       expect(png.width).to eq(320)
@@ -231,7 +231,7 @@
       expect(png.interlace_method).to eq(0)
     end
 
-    it 'correctly returns the raw image data (with no alpha channel) from '\
+    xit 'correctly returns the raw image data (with no alpha channel) from '\
       'the image data chunk' do
       png = described_class.new(img_data)
       png.split_alpha_channel!
@@ -239,7 +239,7 @@
       expect(png.img_data).to eq(data)
     end
 
-    it 'correctly extracts the alpha channel data from the image data chunk' do
+    xit 'correctly extracts the alpha channel data from the image data chunk' do
       png = described_class.new(img_data)
       png.split_alpha_channel!
       data = File.binread(alpha_data_filename)
