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.
Files changed (48) hide show
  1. data/vendor/pdf-inspector/README +18 -0
  2. data/vendor/pdf-inspector/lib/pdf/inspector.rb +26 -0
  3. data/vendor/pdf-inspector/lib/pdf/inspector/extgstate.rb +18 -0
  4. data/vendor/pdf-inspector/lib/pdf/inspector/graphics.rb +131 -0
  5. data/vendor/pdf-inspector/lib/pdf/inspector/page.rb +25 -0
  6. data/vendor/pdf-inspector/lib/pdf/inspector/text.rb +46 -0
  7. data/vendor/pdf-inspector/lib/pdf/inspector/xobject.rb +19 -0
  8. data/vendor/ttfunk/data/fonts/DejaVuSans.ttf +0 -0
  9. data/vendor/ttfunk/data/fonts/comicsans.ttf +0 -0
  10. data/vendor/ttfunk/example.rb +45 -0
  11. data/vendor/ttfunk/lib/ttfunk.rb +102 -0
  12. data/vendor/ttfunk/lib/ttfunk/directory.rb +17 -0
  13. data/vendor/ttfunk/lib/ttfunk/encoding/mac_roman.rb +88 -0
  14. data/vendor/ttfunk/lib/ttfunk/encoding/windows_1252.rb +69 -0
  15. data/vendor/ttfunk/lib/ttfunk/reader.rb +44 -0
  16. data/vendor/ttfunk/lib/ttfunk/resource_file.rb +78 -0
  17. data/vendor/ttfunk/lib/ttfunk/subset.rb +18 -0
  18. data/vendor/ttfunk/lib/ttfunk/subset/base.rb +141 -0
  19. data/vendor/ttfunk/lib/ttfunk/subset/mac_roman.rb +50 -0
  20. data/vendor/ttfunk/lib/ttfunk/subset/unicode.rb +48 -0
  21. data/vendor/ttfunk/lib/ttfunk/subset/unicode_8bit.rb +63 -0
  22. data/vendor/ttfunk/lib/ttfunk/subset/windows_1252.rb +55 -0
  23. data/vendor/ttfunk/lib/ttfunk/subset_collection.rb +72 -0
  24. data/vendor/ttfunk/lib/ttfunk/table.rb +46 -0
  25. data/vendor/ttfunk/lib/ttfunk/table/cmap.rb +34 -0
  26. data/vendor/ttfunk/lib/ttfunk/table/cmap/format00.rb +54 -0
  27. data/vendor/ttfunk/lib/ttfunk/table/cmap/format04.rb +126 -0
  28. data/vendor/ttfunk/lib/ttfunk/table/cmap/subtable.rb +79 -0
  29. data/vendor/ttfunk/lib/ttfunk/table/glyf.rb +64 -0
  30. data/vendor/ttfunk/lib/ttfunk/table/glyf/compound.rb +81 -0
  31. data/vendor/ttfunk/lib/ttfunk/table/glyf/simple.rb +37 -0
  32. data/vendor/ttfunk/lib/ttfunk/table/head.rb +44 -0
  33. data/vendor/ttfunk/lib/ttfunk/table/hhea.rb +41 -0
  34. data/vendor/ttfunk/lib/ttfunk/table/hmtx.rb +47 -0
  35. data/vendor/ttfunk/lib/ttfunk/table/kern.rb +79 -0
  36. data/vendor/ttfunk/lib/ttfunk/table/kern/format0.rb +62 -0
  37. data/vendor/ttfunk/lib/ttfunk/table/loca.rb +43 -0
  38. data/vendor/ttfunk/lib/ttfunk/table/maxp.rb +40 -0
  39. data/vendor/ttfunk/lib/ttfunk/table/name.rb +125 -0
  40. data/vendor/ttfunk/lib/ttfunk/table/os2.rb +78 -0
  41. data/vendor/ttfunk/lib/ttfunk/table/post.rb +91 -0
  42. data/vendor/ttfunk/lib/ttfunk/table/post/format10.rb +43 -0
  43. data/vendor/ttfunk/lib/ttfunk/table/post/format20.rb +35 -0
  44. data/vendor/ttfunk/lib/ttfunk/table/post/format25.rb +23 -0
  45. data/vendor/ttfunk/lib/ttfunk/table/post/format30.rb +17 -0
  46. data/vendor/ttfunk/lib/ttfunk/table/post/format40.rb +17 -0
  47. data/vendor/ttfunk/lib/ttfunk/table/simple.rb +14 -0
  48. 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
@@ -0,0 +1,17 @@
1
+ module TTFunk
2
+ class Table
3
+ class Post
4
+ module Format30
5
+ def glyph_for(code)
6
+ ".notdef"
7
+ end
8
+
9
+ private
10
+
11
+ def parse_format!
12
+ # do nothing. Format 3 is easy-sauce.
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ module TTFunk
2
+ class Table
3
+ class Post
4
+ module Format40
5
+ def glyph_for(code)
6
+ @map[code] || 0xFFFF
7
+ end
8
+
9
+ private
10
+
11
+ def parse_format!
12
+ @map = read(file.maximum_profile.num_glyphs * 2, "N*")
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,14 @@
1
+ require 'ttfunk/table'
2
+
3
+ module TTFunk
4
+ class Table
5
+ class Simple < Table
6
+ attr_reader :tag
7
+
8
+ def initialize(file, tag)
9
+ @tag = tag
10
+ super(file)
11
+ end
12
+ end
13
+ end
14
+ 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: 55
4
+ hash: 53
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 10
9
- - 0
10
- version: 0.10.0
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