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 +4 -4
- data/lib/prawn/markup/processor/images.rb +1 -1
- data/lib/prawn/markup/processor/text.rb +13 -1
- data/lib/prawn/markup/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df28b18b9cd1867a3ddf1b3d0a38be2bc6a222ba3162b7c030cec7e4819dabae
|
4
|
+
data.tar.gz: 707f1c55495e420935df46b7d8430c03155a67fefe5b5feeb2e8fa5a5acc5539
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80702b603383f5613368db4ee66a6a1b3d3eb287f1d9ee90a941361638023dc90876df0f7faf91eb65d42cfca271670eecdbcdf28d525434ed4874bb550ad800
|
7
|
+
data.tar.gz: 803c32a2293ff0b6c73cda474a301af6a3ecdaadd0a85f84639aad4ecd2783386185a2c309f6d95286bcec1156833f87b92a7ca36d51320c1c86af82f39031af
|
@@ -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
|
data/lib/prawn/markup/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2022-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|