alphasights-prawn 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- data/vendor/pdf-inspector/README +18 -0
- data/vendor/pdf-inspector/lib/pdf/inspector.rb +26 -0
- data/vendor/pdf-inspector/lib/pdf/inspector/extgstate.rb +18 -0
- data/vendor/pdf-inspector/lib/pdf/inspector/graphics.rb +131 -0
- data/vendor/pdf-inspector/lib/pdf/inspector/page.rb +25 -0
- data/vendor/pdf-inspector/lib/pdf/inspector/text.rb +46 -0
- data/vendor/pdf-inspector/lib/pdf/inspector/xobject.rb +19 -0
- data/vendor/ttfunk/data/fonts/DejaVuSans.ttf +0 -0
- data/vendor/ttfunk/data/fonts/comicsans.ttf +0 -0
- data/vendor/ttfunk/example.rb +45 -0
- data/vendor/ttfunk/lib/ttfunk.rb +102 -0
- data/vendor/ttfunk/lib/ttfunk/directory.rb +17 -0
- data/vendor/ttfunk/lib/ttfunk/encoding/mac_roman.rb +88 -0
- data/vendor/ttfunk/lib/ttfunk/encoding/windows_1252.rb +69 -0
- data/vendor/ttfunk/lib/ttfunk/reader.rb +44 -0
- data/vendor/ttfunk/lib/ttfunk/resource_file.rb +78 -0
- data/vendor/ttfunk/lib/ttfunk/subset.rb +18 -0
- data/vendor/ttfunk/lib/ttfunk/subset/base.rb +141 -0
- data/vendor/ttfunk/lib/ttfunk/subset/mac_roman.rb +50 -0
- data/vendor/ttfunk/lib/ttfunk/subset/unicode.rb +48 -0
- data/vendor/ttfunk/lib/ttfunk/subset/unicode_8bit.rb +63 -0
- data/vendor/ttfunk/lib/ttfunk/subset/windows_1252.rb +55 -0
- data/vendor/ttfunk/lib/ttfunk/subset_collection.rb +72 -0
- data/vendor/ttfunk/lib/ttfunk/table.rb +46 -0
- data/vendor/ttfunk/lib/ttfunk/table/cmap.rb +34 -0
- data/vendor/ttfunk/lib/ttfunk/table/cmap/format00.rb +54 -0
- data/vendor/ttfunk/lib/ttfunk/table/cmap/format04.rb +126 -0
- data/vendor/ttfunk/lib/ttfunk/table/cmap/subtable.rb +79 -0
- data/vendor/ttfunk/lib/ttfunk/table/glyf.rb +64 -0
- data/vendor/ttfunk/lib/ttfunk/table/glyf/compound.rb +81 -0
- data/vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb +37 -0
- data/vendor/ttfunk/lib/ttfunk/table/head.rb +44 -0
- data/vendor/ttfunk/lib/ttfunk/table/hhea.rb +41 -0
- data/vendor/ttfunk/lib/ttfunk/table/hmtx.rb +47 -0
- data/vendor/ttfunk/lib/ttfunk/table/kern.rb +79 -0
- data/vendor/ttfunk/lib/ttfunk/table/kern/format0.rb +62 -0
- data/vendor/ttfunk/lib/ttfunk/table/loca.rb +43 -0
- data/vendor/ttfunk/lib/ttfunk/table/maxp.rb +40 -0
- data/vendor/ttfunk/lib/ttfunk/table/name.rb +125 -0
- data/vendor/ttfunk/lib/ttfunk/table/os2.rb +78 -0
- data/vendor/ttfunk/lib/ttfunk/table/post.rb +91 -0
- data/vendor/ttfunk/lib/ttfunk/table/post/format10.rb +43 -0
- data/vendor/ttfunk/lib/ttfunk/table/post/format20.rb +35 -0
- data/vendor/ttfunk/lib/ttfunk/table/post/format25.rb +23 -0
- data/vendor/ttfunk/lib/ttfunk/table/post/format30.rb +17 -0
- data/vendor/ttfunk/lib/ttfunk/table/post/format40.rb +17 -0
- data/vendor/ttfunk/lib/ttfunk/table/simple.rb +14 -0
- metadata +50 -3
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'ttfunk/table/post/format10'
|
2
|
+
require 'stringio'
|
3
|
+
|
4
|
+
module TTFunk
|
5
|
+
class Table
|
6
|
+
class Post
|
7
|
+
module Format20
|
8
|
+
include Format10
|
9
|
+
|
10
|
+
def glyph_for(code)
|
11
|
+
index = @glyph_name_index[code]
|
12
|
+
if index <= 257
|
13
|
+
POSTSCRIPT_GLYPHS[index]
|
14
|
+
else
|
15
|
+
@names[index - 258] || ".notdef"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def parse_format!
|
22
|
+
number_of_glyphs = read(2, 'n').first
|
23
|
+
@glyph_name_index = read(number_of_glyphs*2, 'n*')
|
24
|
+
@names = []
|
25
|
+
|
26
|
+
strings = StringIO.new(io.read(offset + length - io.pos))
|
27
|
+
while !strings.eof?
|
28
|
+
length = strings.read(1).unpack("C").first
|
29
|
+
@names << strings.read(length)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'ttfunk/table/post/format10'
|
2
|
+
require 'stringio'
|
3
|
+
|
4
|
+
module TTFunk
|
5
|
+
class Table
|
6
|
+
class Post
|
7
|
+
module Format25
|
8
|
+
include Format10
|
9
|
+
|
10
|
+
def glyph_for(code)
|
11
|
+
POSTSCRIPT_GLYPHS[code + @offsets[code]] || ".notdef"
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def parse_format!
|
17
|
+
number_of_glyphs = read(2, 'n').first
|
18
|
+
@offsets = read(@number_of_glyphs, "c*")
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alphasights-prawn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 53
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 10
|
9
|
-
-
|
10
|
-
version: 0.10.
|
9
|
+
- 1
|
10
|
+
version: 0.10.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Gregory Brown
|
@@ -225,6 +225,53 @@ files:
|
|
225
225
|
- spec/text_spec.rb
|
226
226
|
- spec/text_with_inline_formatting_spec.rb
|
227
227
|
- spec/transparency_spec.rb
|
228
|
+
- vendor/pdf-inspector/lib/pdf/inspector/extgstate.rb
|
229
|
+
- vendor/pdf-inspector/lib/pdf/inspector/graphics.rb
|
230
|
+
- vendor/pdf-inspector/lib/pdf/inspector/page.rb
|
231
|
+
- vendor/pdf-inspector/lib/pdf/inspector/text.rb
|
232
|
+
- vendor/pdf-inspector/lib/pdf/inspector/xobject.rb
|
233
|
+
- vendor/pdf-inspector/lib/pdf/inspector.rb
|
234
|
+
- vendor/pdf-inspector/README
|
235
|
+
- vendor/ttfunk/data/fonts/comicsans.ttf
|
236
|
+
- vendor/ttfunk/data/fonts/DejaVuSans.ttf
|
237
|
+
- vendor/ttfunk/example.rb
|
238
|
+
- vendor/ttfunk/lib/ttfunk/directory.rb
|
239
|
+
- vendor/ttfunk/lib/ttfunk/encoding/mac_roman.rb
|
240
|
+
- vendor/ttfunk/lib/ttfunk/encoding/windows_1252.rb
|
241
|
+
- vendor/ttfunk/lib/ttfunk/reader.rb
|
242
|
+
- vendor/ttfunk/lib/ttfunk/resource_file.rb
|
243
|
+
- vendor/ttfunk/lib/ttfunk/subset/base.rb
|
244
|
+
- vendor/ttfunk/lib/ttfunk/subset/mac_roman.rb
|
245
|
+
- vendor/ttfunk/lib/ttfunk/subset/unicode.rb
|
246
|
+
- vendor/ttfunk/lib/ttfunk/subset/unicode_8bit.rb
|
247
|
+
- vendor/ttfunk/lib/ttfunk/subset/windows_1252.rb
|
248
|
+
- vendor/ttfunk/lib/ttfunk/subset.rb
|
249
|
+
- vendor/ttfunk/lib/ttfunk/subset_collection.rb
|
250
|
+
- vendor/ttfunk/lib/ttfunk/table/cmap/format00.rb
|
251
|
+
- vendor/ttfunk/lib/ttfunk/table/cmap/format04.rb
|
252
|
+
- vendor/ttfunk/lib/ttfunk/table/cmap/subtable.rb
|
253
|
+
- vendor/ttfunk/lib/ttfunk/table/cmap.rb
|
254
|
+
- vendor/ttfunk/lib/ttfunk/table/glyf/compound.rb
|
255
|
+
- vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb
|
256
|
+
- vendor/ttfunk/lib/ttfunk/table/glyf.rb
|
257
|
+
- vendor/ttfunk/lib/ttfunk/table/head.rb
|
258
|
+
- vendor/ttfunk/lib/ttfunk/table/hhea.rb
|
259
|
+
- vendor/ttfunk/lib/ttfunk/table/hmtx.rb
|
260
|
+
- vendor/ttfunk/lib/ttfunk/table/kern/format0.rb
|
261
|
+
- vendor/ttfunk/lib/ttfunk/table/kern.rb
|
262
|
+
- vendor/ttfunk/lib/ttfunk/table/loca.rb
|
263
|
+
- vendor/ttfunk/lib/ttfunk/table/maxp.rb
|
264
|
+
- vendor/ttfunk/lib/ttfunk/table/name.rb
|
265
|
+
- vendor/ttfunk/lib/ttfunk/table/os2.rb
|
266
|
+
- vendor/ttfunk/lib/ttfunk/table/post/format10.rb
|
267
|
+
- vendor/ttfunk/lib/ttfunk/table/post/format20.rb
|
268
|
+
- vendor/ttfunk/lib/ttfunk/table/post/format25.rb
|
269
|
+
- vendor/ttfunk/lib/ttfunk/table/post/format30.rb
|
270
|
+
- vendor/ttfunk/lib/ttfunk/table/post/format40.rb
|
271
|
+
- vendor/ttfunk/lib/ttfunk/table/post.rb
|
272
|
+
- vendor/ttfunk/lib/ttfunk/table/simple.rb
|
273
|
+
- vendor/ttfunk/lib/ttfunk/table.rb
|
274
|
+
- vendor/ttfunk/lib/ttfunk.rb
|
228
275
|
- data/encodings/win_ansi.txt
|
229
276
|
- data/fonts/Action Man.dfont
|
230
277
|
- data/fonts/Activa.ttf
|