obf 0.9.8.24 → 0.9.8.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/obf/pdf.rb +12 -11
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9b0d4ab79e44a904b9a3bc4461a7faa579e57fef811a9186b266dacaf9214e2
4
- data.tar.gz: 29b7aaa4520e477ac4ba0b56eb10a60504c5219f398f4e84079e575124a02dca
3
+ metadata.gz: e6add0691a31359799dec36bf6c6e8233b853bd89a34395581a117be36a09051
4
+ data.tar.gz: a3092d682f7e92f8b3718df3101b4c75c90747f720ff75779f12da36cce3b635
5
5
  SHA512:
6
- metadata.gz: dcbfab462b4f69098879cc4e7fcf02f519ab49a9004b8f4e7ccb84b5dc3241f0c41bce1f60bddb7386893ea7c60d042e71d9455660ce4e1e17ad0471b92b2399
7
- data.tar.gz: 2e9f364ebc4415c3e76ae754f98ac8ebb4ee87a48a54b9798105d5d70169807ee96ef06321e47ae53d9be5caff31a8e5fdc7df13a7e695dc25d2344ffeb9632f
6
+ metadata.gz: 505f71a0513920346010ffc1195d1b50f6667098cf85775f274f594801f9785562cac336652e1eeb980354d1eb0ec49e368ae99612b16f015b7bd2cb879d27b0
7
+ data.tar.gz: 8a1df87595566010257673eecc64e88a741814bfe833d7a21f21e36728a6296ed322c2fac99875f7a210bd44d76227a54a55ecaf7a09e39bf6e715e9ab283bdc
@@ -44,25 +44,25 @@ module OBF::PDF
44
44
  }
45
45
  pdf = Prawn::Document.new(doc_opts)
46
46
  # remember: https://www.alphabet-type.com/tools/charset-checker/
47
- pdf.font_families['THFahKwangBold'] = {
47
+ pdf.font_families.update('THFahKwangBold' => {
48
48
  normal: {font: 'THFahKwangBold', file: File.expand_path('../../THFahKwangBold.ttf', __FILE__)}
49
- }
50
- pdf.font_families['MiedingerBook'] = {
49
+ })
50
+ pdf.font_families.update('MiedingerBook' => {
51
51
  normal: {font: 'MiedingerBook', file: File.expand_path('../../MiedingerBook.ttf', __FILE__)}
52
- }
53
- pdf.font_families['TimesNewRoman'] = {
52
+ })
53
+ pdf.font_families.update('TimesNewRoman' => {
54
54
  normal: {font: 'TimesNewRoman', file: File.expand_path('../../TimesNewRoman.ttf', __FILE__)}
55
- }
56
- pdf.font_families['Arial'] = {
55
+ })
56
+ pdf.font_families.update('Arial' => {
57
57
  normal: {font: 'Arial', file: File.expand_path('../../Arial.ttf', __FILE__)}
58
- }
59
- pdf.fallback_fonts = ['TimesNewRoman', 'THFahKwangBold', 'MiedingerBook', 'Arial']
58
+ })
59
+ pdf.fallback_fonts = ['Times-Roman', 'THFahKwangBold', 'MiedingerBook', 'Arial']
60
60
 
61
61
  font = opts['font'] if opts['font'] && File.exists?(opts['font'])
62
62
  if font && File.exists?(font)
63
63
  pdf.font(font)
64
64
  else
65
- #pdf.font('TimesNewRoman')
65
+ pdf.font('Arial')
66
66
  end
67
67
 
68
68
  multi_render_paths = []
@@ -133,6 +133,7 @@ module OBF::PDF
133
133
  })
134
134
  end
135
135
  if multi_render_paths.length > 0
136
+ # `cp #{multi_render_paths[0]} #{dest_path}`
136
137
  `gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sOutputFile=#{dest_path} #{multi_render_paths.join(' ')}`
137
138
  else
138
139
  pdf.render_file(dest_path)
@@ -360,7 +361,7 @@ module OBF::PDF
360
361
  if font && File.exists?(font)
361
362
  pdf.font(font)
362
363
  else
363
- pdf.font('TimesNewRoman')
364
+ pdf.font('Times-Roman')
364
365
  end
365
366
  direction = text.match(rtl_regex) ? :rtl : :ltr
366
367
  if options['text_case'] == 'upper'
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.24
4
+ version: 0.9.8.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Whitmer