obf 0.9.8.29 → 0.9.8.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/obf/pdf.rb +5 -9
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab8d6c820407568bba7920cfc2971a9d355ef8e1646dcdf4ebd551160b448db7
4
- data.tar.gz: dcdd4f363af84c8718b77b15776fb3aa6df112a73a3b3bd7fb51e4575c3c8073
3
+ metadata.gz: 1cb56d99fe87de9bba6903881552faf415b2d448f4b2db53a9dbef31920822b7
4
+ data.tar.gz: ce3feae227bfbcbed640c6e6fe58dddcfbd5656763ce7ca10c24a0f0bd76e155
5
5
  SHA512:
6
- metadata.gz: 3681128820b268abcce7768ec959a4ffb6602dff484f66a1c22cfd05f38085b8725dd967cbdfedf82aad848557a596f53580fa22808ae30a7a462bb69a2d1704
7
- data.tar.gz: 067ee961f16ec6d03e0e70bde87cbe91cda01dde1b624bec5f5f3f957f7d1420c27a0a36fdab2cbe141a435dea32cd3b0de551ceb027f26f7fcc5db933faca4b
6
+ metadata.gz: ee15c8c553577d46247d9105ffd24fa982704f615eba9efa32c32d7c019fe4f72e384e72e05b8d1b835985d9dd9f665d525cdc38cc85da514241d7b154e3760e
7
+ data.tar.gz: f6f8f9f2ab1ef2b9e2eebe33d53b4641dadc9f4bc522114afd9f6f6dfa857093239035ed706c6dee3cd972a3d8f9d470128ed61a7ee73cd6af52f48d0fc6e654
data/lib/obf/pdf.rb CHANGED
@@ -62,7 +62,7 @@ module OBF::PDF
62
62
  if font && File.exists?(font)
63
63
  pdf.font(font)
64
64
  else
65
- pdf.font('Arial')
65
+ File.expand_path('../../Arial.ttf', __FILE__)
66
66
  end
67
67
 
68
68
  multi_render_paths = []
@@ -157,11 +157,7 @@ module OBF::PDF
157
157
  if !options['headerless']
158
158
  header_height = 80
159
159
  pdf.bounding_box([0, doc_height], :width => doc_width, :height => header_height) do
160
- begin
161
- pdf.font('Arial')
162
- rescue => e
163
- pdf.font(File.expand_path('../../Arial.ttf', __FILE__)) rescue nil
164
- end
160
+ pdf.font(File.expand_path('../../Arial.ttf', __FILE__)) rescue nil
165
161
  pdf.line_width = 2
166
162
  pdf.font_size 16
167
163
  pdf.fill_color "eeeeee"
@@ -183,7 +179,7 @@ module OBF::PDF
183
179
  pdf.formatted_text_box [text_options], :at => [x + 10, header_height], :width => 80, :height => 80, :align => :center, :valign => :bottom, :overflow => :shrink_to_fit
184
180
  backlinks = (options['backlinks'] || []).join(',')
185
181
  pdf.fill_color "ffffff"
186
- pdf.formatted_text_box [{:text => backlinks}], :at => [x + 10, header_height + 5 - 25], :width => 80, :height => 30, :align => :center, :valign => :center, :overflow => :shrink_to_fit
182
+ pdf.formatted_text_box [{:text => backlinks}], :at => [x + 20, header_height + 5 - 25], :width => 70, :height => 30, :align => :center, :valign => :center, :overflow => :shrink_to_fit
187
183
  end
188
184
  end
189
185
 
@@ -357,7 +353,7 @@ module OBF::PDF
357
353
  if font && File.exists?(font)
358
354
  pdf.font(font)
359
355
  else
360
- pdf.font('Times-Roman')
356
+ pdf.font(File.expand_path('../../TimesNewRoman.ttf', __FILE__))
361
357
  end
362
358
  direction = text.match(rtl_regex) ? :rtl : :ltr
363
359
  if options['text_case'] == 'upper'
@@ -424,7 +420,7 @@ module OBF::PDF
424
420
  # footer
425
421
  pdf.fill_color "bbbbbb"
426
422
  obj['name'] = nil if obj['name'] == 'Unnamed Board'
427
- pdf.font('Times-Roman')
423
+ pdf.font(File.expand_path('../../Arial.ttf', __FILE__))
428
424
  if OBF::PDF.footer_text || obj['name']
429
425
  text = [obj['name'], OBF::PDF.footer_text].compact.join(', ')
430
426
  offset = options['pages'] ? 400 : 300
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8.29
4
+ version: 0.9.8.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Whitmer