hexapdf 1.8.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +3 -0
  4. data/Rakefile +1 -1
  5. data/data/hexapdf/fonts/Inter-Bold.ttf +0 -0
  6. data/data/hexapdf/fonts/Inter-BoldItalic.ttf +0 -0
  7. data/data/hexapdf/fonts/Inter-Italic.ttf +0 -0
  8. data/data/hexapdf/fonts/Inter-Regular.ttf +0 -0
  9. data/data/hexapdf/fonts/OFL.txt +92 -0
  10. data/examples/019-acro_form.rb +3 -1
  11. data/examples/030-pdfa.rb +9 -16
  12. data/examples/034-text_shaping.rb +37 -0
  13. data/lib/hexapdf/configuration.rb +13 -1
  14. data/lib/hexapdf/content/processor.rb +14 -0
  15. data/lib/hexapdf/document/annotations.rb +25 -0
  16. data/lib/hexapdf/font/cmap/writer.rb +15 -9
  17. data/lib/hexapdf/font/true_type_wrapper.rb +6 -3
  18. data/lib/hexapdf/font_loader.rb +47 -0
  19. data/lib/hexapdf/layout/container_box.rb +2 -4
  20. data/lib/hexapdf/layout/style.rb +66 -4
  21. data/lib/hexapdf/layout/table_box.rb +96 -13
  22. data/lib/hexapdf/layout/text_fragment.rb +13 -7
  23. data/lib/hexapdf/layout/text_shaper.rb +162 -10
  24. data/lib/hexapdf/type/annotations/appearance_generator.rb +42 -0
  25. data/lib/hexapdf/type/annotations/ink.rb +107 -0
  26. data/lib/hexapdf/type/annotations.rb +1 -0
  27. data/lib/hexapdf/version.rb +1 -1
  28. data/test/hexapdf/content/test_processor.rb +17 -0
  29. data/test/hexapdf/digital_signature/common.rb +5 -5
  30. data/test/hexapdf/digital_signature/test_cms_handler.rb +1 -1
  31. data/test/hexapdf/document/test_annotations.rb +10 -0
  32. data/test/hexapdf/document/test_layout.rb +6 -3
  33. data/test/hexapdf/font/cmap/test_writer.rb +8 -6
  34. data/test/hexapdf/font/test_true_type_wrapper.rb +4 -0
  35. data/test/hexapdf/layout/test_container_box.rb +3 -1
  36. data/test/hexapdf/layout/test_style.rb +4 -0
  37. data/test/hexapdf/layout/test_table_box.rb +117 -1
  38. data/test/hexapdf/layout/test_text_fragment.rb +18 -8
  39. data/test/hexapdf/layout/test_text_shaper.rb +55 -5
  40. data/test/hexapdf/type/annotations/test_appearance_generator.rb +63 -0
  41. data/test/hexapdf/type/annotations/test_ink.rb +31 -0
  42. metadata +23 -1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hexapdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Leitner
@@ -77,6 +77,20 @@ dependencies:
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
79
  version: 3.1.2
80
+ - !ruby/object:Gem::Dependency
81
+ name: harfbuzz-ruby
82
+ requirement: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - "~>"
85
+ - !ruby/object:Gem::Version
86
+ version: '1.0'
87
+ type: :development
88
+ prerelease: false
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - "~>"
92
+ - !ruby/object:Gem::Version
93
+ version: '1.0'
80
94
  - !ruby/object:Gem::Dependency
81
95
  name: brotli
82
96
  requirement: !ruby/object:Gem::Requirement
@@ -315,6 +329,11 @@ files:
315
329
  - data/hexapdf/cmap/V
316
330
  - data/hexapdf/encoding/glyphlist.txt
317
331
  - data/hexapdf/encoding/zapfdingbats.txt
332
+ - data/hexapdf/fonts/Inter-Bold.ttf
333
+ - data/hexapdf/fonts/Inter-BoldItalic.ttf
334
+ - data/hexapdf/fonts/Inter-Italic.ttf
335
+ - data/hexapdf/fonts/Inter-Regular.ttf
336
+ - data/hexapdf/fonts/OFL.txt
318
337
  - data/hexapdf/sRGB2014.icc
319
338
  - data/hexapdf/sRGB2014.icc.LICENSE
320
339
  - examples/001-hello_world.rb
@@ -350,6 +369,7 @@ files:
350
369
  - examples/031-acro_form_java_script.rb
351
370
  - examples/032-acro_form_list_and_fill.rb
352
371
  - examples/033-text_extraction.rb
372
+ - examples/034-text_shaping.rb
353
373
  - examples/emoji-smile.png
354
374
  - examples/emoji-wink.png
355
375
  - examples/machupicchu.jpg
@@ -546,6 +566,7 @@ files:
546
566
  - lib/hexapdf/type/annotations/border_effect.rb
547
567
  - lib/hexapdf/type/annotations/border_styling.rb
548
568
  - lib/hexapdf/type/annotations/circle.rb
569
+ - lib/hexapdf/type/annotations/ink.rb
549
570
  - lib/hexapdf/type/annotations/interior_color.rb
550
571
  - lib/hexapdf/type/annotations/line.rb
551
572
  - lib/hexapdf/type/annotations/line_ending_styling.rb
@@ -842,6 +863,7 @@ files:
842
863
  - test/hexapdf/type/annotations/test_appearance_generator.rb
843
864
  - test/hexapdf/type/annotations/test_border_effect.rb
844
865
  - test/hexapdf/type/annotations/test_border_styling.rb
866
+ - test/hexapdf/type/annotations/test_ink.rb
845
867
  - test/hexapdf/type/annotations/test_interior_color.rb
846
868
  - test/hexapdf/type/annotations/test_line.rb
847
869
  - test/hexapdf/type/annotations/test_line_ending_styling.rb