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 +4 -4
- data/lib/MiedingerBook.ttf +0 -0
- data/lib/obf/pdf.rb +14 -5
- metadata +2 -2
- data/lib/MangalRegular.ttf +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eafa95ed1b416cb55b13e12c500ff6b23739d40f6622f9f0acbee76002d652df
|
4
|
+
data.tar.gz: 3da4853d9f57b09075ddc717dc3fa18fd25d5f42bb42e7f8b5d26c084d58cd6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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['
|
50
|
-
normal: {font: '
|
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', '
|
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('../../
|
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.
|
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/
|
148
|
+
- lib/MiedingerBook.ttf
|
149
149
|
- lib/THFahKwangBold.ttf
|
150
150
|
- lib/TimesNewRoman.ttf
|
151
151
|
- lib/obf.rb
|
data/lib/MangalRegular.ttf
DELETED
Binary file
|