prawn-markup 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3e26315f0588069e152aea5344bb9e79523b71aed0a574875036802ccb3a3d0
4
- data.tar.gz: 1c9f31e0e3d19c4bc0c9811d1c0043512a11fa5ca9b15e864919c3ab4d633402
3
+ metadata.gz: df28b18b9cd1867a3ddf1b3d0a38be2bc6a222ba3162b7c030cec7e4819dabae
4
+ data.tar.gz: 707f1c55495e420935df46b7d8430c03155a67fefe5b5feeb2e8fa5a5acc5539
5
5
  SHA512:
6
- metadata.gz: 4251fb1e5ea67b00c9e8281712f3bfe6a866c5ec2054c972de9be13d56939c3342e3cebc23a0cbe3164aa93b2fd6a59fa85de83487a8690413ebaad747b16ff1
7
- data.tar.gz: b9900e07d2636efe47842bf2ca9b8a6445cdfe3cee1d9fb92149f9c7e6c80956081cf4bebce79be9245a7c7968892abbe6563af8df5b5ff762bfdb4fb680d4d4
6
+ metadata.gz: 80702b603383f5613368db4ee66a6a1b3d3eb287f1d9ee90a941361638023dc90876df0f7faf91eb65d42cfca271670eecdbcdf28d525434ed4874bb550ad800
7
+ data.tar.gz: 803c32a2293ff0b6c73cda474a301af6a3ecdaadd0a85f84639aad4ecd2783386185a2c309f6d95286bcec1156833f87b92a7ca36d51320c1c86af82f39031af
@@ -75,7 +75,7 @@ module Prawn
75
75
  if src =~ %r{^https?:/}
76
76
  begin
77
77
  URI.parse(src).open
78
- rescue OpenURI::HTTPError, SocketError
78
+ rescue StandardError # OpenURI::HTTPError, SocketError or anything else
79
79
  nil
80
80
  end
81
81
  end
@@ -6,7 +6,7 @@ module Prawn
6
6
  def self.prepended(base)
7
7
  base.known_elements.push(
8
8
  'a', 'b', 'strong', 'i', 'em', 'u', 'strikethrough', 'strike', 's', 'del',
9
- 'sub', 'sup', 'color'
9
+ 'sub', 'sup', 'color', 'font'
10
10
  )
11
11
  end
12
12
 
@@ -91,6 +91,18 @@ module Prawn
91
91
  def end_color
92
92
  append_text('</color>')
93
93
  end
94
+
95
+ def start_font
96
+ font_attrs = current_attrs
97
+ .slice('size', 'name', 'character_spacing')
98
+ .reduce('') { |acc, (key, val)| "#{acc} #{key}=\"#{val}\"" }
99
+
100
+ append_text("<font #{font_attrs}>")
101
+ end
102
+
103
+ def end_font
104
+ append_text('</font>')
105
+ end
94
106
  end
95
107
  end
96
108
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Prawn
4
4
  module Markup
5
- VERSION = '0.3.5'
5
+ VERSION = '0.3.6'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prawn-markup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pascal Zumkehr
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-11 00:00:00.000000000 Z
11
+ date: 2022-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri