obf 0.9.8.1 → 0.9.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/MangalRegular.ttf +0 -0
- data/lib/obf/pdf.rb +9 -8
- metadata +2 -2
- data/lib/Nepali.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: 10054b15d7b19f6aae4d388b339c8cc105dd091190f687f5b25959f11f4aafbf
|
4
|
+
data.tar.gz: 5aff0330d3b04d67f50a2abd4aed606c11b1fba8890f40f113467bc3532edf40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2604356e2cd9b5940417eefc1cf81c1c7c63693e1803b03c707f624eaab449cea0f2120f3db10cae751132052432f1034495ec0c3f042e592b3e6f0be987d369
|
7
|
+
data.tar.gz: b949477c4d8691570b76db29f56a3a0c01babd426096a0b8cb0c14d2f4ec39db0081dad57c81f0725d45e6fbaf41a9aad365df297e6b841618e679c3b10971b3
|
Binary file
|
data/lib/obf/pdf.rb
CHANGED
@@ -46,10 +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['MangalRegular'] = {
|
50
|
+
normal: {font: 'MangalRegular', file: File.expand_path('../../MangalRegular.ttf', __FILE__)}
|
51
51
|
}
|
52
|
-
pdf.
|
52
|
+
pdf.font_families['TimesNewRoman'] = {
|
53
|
+
normal: {font: 'TimesNewRoman', file: File.expand_path('../../TimesNewRoman.ttf', __FILE__)}
|
54
|
+
}
|
55
|
+
pdf.fallback_fonts = ['TimesNewRoman', 'THFahKwangBold', 'MangalRegular']
|
53
56
|
|
54
57
|
font = opts['font'] if opts['font'] && File.exists?(opts['font'])
|
55
58
|
font ||= File.expand_path('../../TimesNewRoman.ttf', __FILE__)
|
@@ -198,11 +201,9 @@ module OBF::PDF
|
|
198
201
|
|
199
202
|
text = (button['label'] || button['vocalization']).to_s
|
200
203
|
font = options['font']
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
# elsif text.match(Regexp.new("[" + NEPALI_ALPHABET + "]")
|
205
|
-
# font = File.expand_path('../../Nepali.ttf', __FILE__)
|
204
|
+
# Nepali text isn't working as a fallback for some reason, it says "bad font family"
|
205
|
+
if text.match(Regexp.new("[" + NEPALI_ALPHABET + "]"))
|
206
|
+
font = File.expand_path('../../MangalRegular.ttf', __FILE__)
|
206
207
|
end
|
207
208
|
pdf.font(font) if font && File.exists?(font)
|
208
209
|
direction = text.match(rtl_regex) ? :rtl : :ltr
|
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.2
|
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/MangalRegular.ttf
|
149
149
|
- lib/THFahKwangBold.ttf
|
150
150
|
- lib/TimesNewRoman.ttf
|
151
151
|
- lib/obf.rb
|
data/lib/Nepali.ttf
DELETED
Binary file
|