obf 0.9.8.2 → 0.9.8.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10054b15d7b19f6aae4d388b339c8cc105dd091190f687f5b25959f11f4aafbf
4
- data.tar.gz: 5aff0330d3b04d67f50a2abd4aed606c11b1fba8890f40f113467bc3532edf40
3
+ metadata.gz: eafa95ed1b416cb55b13e12c500ff6b23739d40f6622f9f0acbee76002d652df
4
+ data.tar.gz: 3da4853d9f57b09075ddc717dc3fa18fd25d5f42bb42e7f8b5d26c084d58cd6a
5
5
  SHA512:
6
- metadata.gz: 2604356e2cd9b5940417eefc1cf81c1c7c63693e1803b03c707f624eaab449cea0f2120f3db10cae751132052432f1034495ec0c3f042e592b3e6f0be987d369
7
- data.tar.gz: b949477c4d8691570b76db29f56a3a0c01babd426096a0b8cb0c14d2f4ec39db0081dad57c81f0725d45e6fbaf41a9aad365df297e6b841618e679c3b10971b3
6
+ metadata.gz: e8f8063dd7c0a46eb6731f1f53b86d3b332a8fecb1109de08298b2cd154032cab72199dfa85ded33be17c08ffe2a2da2bb684155f2fa30a8d9856ae8f24129f6
7
+ data.tar.gz: b2cf4abf5090c5a1f27f315ad0091a9fcc80bab41db1028ca20803828531ba766f3df621f31bb31d7528e9d449aae292205f99ff5902952c93097bfeed58f54c
Binary file
data/lib/obf/pdf.rb CHANGED
@@ -46,13 +46,13 @@ module OBF::PDF
46
46
  pdf.font_families['THFahKwangBold'] = {
47
47
  normal: {font: 'THFahKwangBold', file: File.expand_path('../../THFahKwangBold.ttf', __FILE__)}
48
48
  }
49
- pdf.font_families['MangalRegular'] = {
50
- normal: {font: 'MangalRegular', file: File.expand_path('../../MangalRegular.ttf', __FILE__)}
49
+ pdf.font_families['MiedingerBook'] = {
50
+ normal: {font: 'MiedingerBook', file: File.expand_path('../../MiedingerBook.ttf', __FILE__)}
51
51
  }
52
52
  pdf.font_families['TimesNewRoman'] = {
53
53
  normal: {font: 'TimesNewRoman', file: File.expand_path('../../TimesNewRoman.ttf', __FILE__)}
54
54
  }
55
- pdf.fallback_fonts = ['TimesNewRoman', 'THFahKwangBold', 'MangalRegular']
55
+ pdf.fallback_fonts = ['TimesNewRoman', 'THFahKwangBold', 'MiedingerBook']
56
56
 
57
57
  font = opts['font'] if opts['font'] && File.exists?(opts['font'])
58
58
  font ||= File.expand_path('../../TimesNewRoman.ttf', __FILE__)
@@ -203,7 +203,7 @@ module OBF::PDF
203
203
  font = options['font']
204
204
  # Nepali text isn't working as a fallback for some reason, it says "bad font family"
205
205
  if text.match(Regexp.new("[" + NEPALI_ALPHABET + "]"))
206
- font = File.expand_path('../../MangalRegular.ttf', __FILE__)
206
+ font = File.expand_path('../../MiedingerBook.ttf', __FILE__)
207
207
  end
208
208
  pdf.font(font) if font && File.exists?(font)
209
209
  direction = text.match(rtl_regex) ? :rtl : :ltr
@@ -338,4 +338,13 @@ module OBF::PDF
338
338
  def self.to_png(pdf, dest_path)
339
339
  OBF::PNG.from_pdf(pdf, dest_path)
340
340
  end
341
- end
341
+ end
342
+
343
+ pdf = Prawn::Document.new
344
+ pdf.font "/Users/whitmer/Workspace/obf/lib/TimesNewRoman.ttf"
345
+ pdf.font_families.update({'MiedingerBook.otf' => {
346
+ normal: "/Users/whitmer/Workspace/obf/lib/MiedingerBook.ttf"
347
+ }})
348
+ pdf.fallback_fonts = ['MiedingerBook.otf']
349
+ pdf.text_box "भन्नुहोस्"
350
+ pdf.render_file("/Userss/whitmer/Workspace/prawn.pdf")
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.2
4
+ version: 0.9.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Whitmer
@@ -145,7 +145,7 @@ extra_rdoc_files:
145
145
  files:
146
146
  - LICENSE
147
147
  - README.md
148
- - lib/MangalRegular.ttf
148
+ - lib/MiedingerBook.ttf
149
149
  - lib/THFahKwangBold.ttf
150
150
  - lib/TimesNewRoman.ttf
151
151
  - lib/obf.rb
Binary file