chunky_text 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README +2 -1
- data/chunky_text.gemspec +1 -1
- data/font/default_font.rb +20 -0
- data/font/default_font.rb~ +40 -1
- metadata +4 -4
- data/chunky_text.rb~ +0 -62
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb7831b044adeeb0d9678712e1af80e62d9927b7
|
4
|
+
data.tar.gz: c552886c9542495fb695f01b3879bf2265895185
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 779d1528d0d55e8fd9e41014055c3c1b0e14b713deb6724fcd4c123193f10b6783933feeb8cda8fdbf7564844bf53c7adc69af4e0e4b49221afb520e4bee92a9
|
7
|
+
data.tar.gz: bcd550412ee657429c0a96e4694b025dda37e7f46580e2bef2b2956fa9f701b91d049374edbae2059ab8984d56935ac7872a78c6f9d98a7055c145c7e2857a6e
|
data/README
CHANGED
data/chunky_text.gemspec
CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.description = File.read(File.join(File.dirname(__FILE__), 'README'))
|
5
5
|
s.license = "MIT"
|
6
6
|
s.requirements= ['chunky_png gem must be installed.']
|
7
|
-
s.version = "0.2.
|
7
|
+
s.version = "0.2.7"
|
8
8
|
s.author = "Marco Bagnaresi"
|
9
9
|
s.email = "info@mbcraft.it"
|
10
10
|
s.homepage = "http://www.mbcraft.it/products/chunky_text.php"
|
data/font/default_font.rb
CHANGED
@@ -124,10 +124,29 @@ module ChunkyText::Font
|
|
124
124
|
'ñ' => [[[34.0,81.0],[35.0,42.0],],[[36.0,54.0],[43.0,49.0],[50.0,45.0],[61.0,45.0],[69.0,53.0],[70.0,82.0],],[[35.0,32.0],[38.0,29.0],[42.0,28.0],[52.0,33.0],[53.0,34.0],[56.0,37.0],[60.0,36.0],[66.0,32.0],[69.0,30.0],],],
|
125
125
|
'é' => [[[63.0,66.0],[59.0,73.0],[50.0,79.0],[43.0,79.0],[37.0,73.0],[32.0,65.0],[29.0,52.0],[31.0,43.0],[41.0,40.0],[54.0,40.0],[63.0,47.0],[64.0,53.0],[30.0,54.0],],[[42.0,31.0],[56.0,22.0],],],
|
126
126
|
'è' => [[[62.0,69.0],[59.0,75.0],[52.0,80.0],[47.0,80.0],[41.0,80.0],[35.0,74.0],[30.0,66.0],[31.0,59.0],[34.0,50.0],[40.0,44.0],[51.0,41.0],[59.0,46.0],[63.0,55.0],[33.0,54.0],],[[55.0,35.0],[39.0,25.0],],],
|
127
|
+
'ê' => [[[39.0,60.0],[64.0,60.0],[67.0,55.0],[63.0,50.0],[58.0,45.0],[47.0,44.0],[44.0,45.0],[41.0,51.0],[39.0,58.0],[42.0,77.0],[48.0,80.0],[59.0,80.0],[63.0,76.0],[66.0,73.0],],[[42.0,31.0],[51.0,22.0],[61.0,34.0],],],
|
128
|
+
'ë' => [[[39.0,53.0],[66.0,53.0],[63.0,44.0],[60.0,39.0],[54.0,36.0],[45.0,37.0],[40.0,40.0],[38.0,53.0],[38.0,57.0],[42.0,73.0],[48.0,78.0],[50.0,78.0],[56.0,79.0],[59.0,77.0],[62.0,73.0],[64.0,71.0],],[[44.0,26.0],[40.0,26.0],[40.0,18.0],[45.0,18.0],[47.0,19.0],[47.0,23.0],[45.0,25.0],],[[59.0,28.0],[54.0,21.0],[56.0,21.0],[59.0,18.0],[63.0,21.0],[61.0,29.0],],],
|
127
129
|
'ò' => [[[55.0,80.0],[50.0,80.0],[42.0,79.0],[34.0,70.0],[31.0,64.0],[31.0,56.0],[38.0,46.0],[52.0,45.0],[69.0,62.0],[67.0,71.0],[60.0,79.0],[50.0,80.0],],[[59.0,35.0],[37.0,22.0],],],
|
130
|
+
'ó' => [[[54.0,82.0],[45.0,81.0],[41.0,80.0],[35.0,75.0],[33.0,67.0],[35.0,60.0],[38.0,54.0],[44.0,49.0],[55.0,46.0],[61.0,51.0],[63.0,57.0],[65.0,68.0],[55.0,82.0],],[[43.0,36.0],[57.0,27.0],],],
|
131
|
+
'ô' => [[[54.0,82.0],[47.0,81.0],[40.0,78.0],[36.0,66.0],[35.0,58.0],[38.0,52.0],[46.0,49.0],[52.0,49.0],[61.0,54.0],[67.0,70.0],[66.0,77.0],[56.0,82.0],],[[40.0,40.0],[50.0,30.0],[59.0,41.0],],],
|
132
|
+
'õ' => [[[56.0,82.0],[46.0,81.0],[40.0,77.0],[36.0,71.0],[36.0,62.0],[41.0,53.0],[45.0,51.0],[56.0,50.0],[63.0,57.0],[66.0,65.0],[64.0,76.0],[57.0,81.0],],[[40.0,38.0],[46.0,33.0],[50.0,31.0],[55.0,34.0],[56.0,39.0],[57.0,41.0],[68.0,41.0],[68.0,37.0],[69.0,34.0],],],
|
133
|
+
'ö' => [[[50.0,81.0],[43.0,79.0],[38.0,75.0],[34.0,71.0],[33.0,66.0],[34.0,60.0],[38.0,55.0],[43.0,53.0],[50.0,53.0],[60.0,56.0],[64.0,69.0],[62.0,76.0],[51.0,81.0],],[[43.0,43.0],[36.0,42.0],[35.0,38.0],[41.0,34.0],[45.0,36.0],[46.0,42.0],[44.0,44.0],],[[57.0,45.0],[53.0,42.0],[52.0,37.0],[58.0,34.0],[63.0,40.0],[59.0,45.0],],],
|
128
134
|
'à' => [[[33.0,46.0],[39.0,43.0],[46.0,43.0],[55.0,42.0],[63.0,57.0],[62.0,66.0],[60.0,75.0],[64.0,79.0],[71.0,81.0],],[[61.0,69.0],[59.0,73.0],[53.0,77.0],[48.0,80.0],[40.0,80.0],[38.0,80.0],[33.0,74.0],[33.0,68.0],[41.0,62.0],[51.0,61.0],[57.0,66.0],[62.0,69.0],],[[55.0,32.0],[38.0,23.0],],],
|
135
|
+
'á' => [[[64.0,73.0],[59.0,77.0],[48.0,82.0],[38.0,80.0],[33.0,71.0],[32.0,58.0],[36.0,53.0],[45.0,50.0],[52.0,50.0],[58.0,54.0],[65.0,65.0],[66.0,71.0],],[[32.0,36.0],[38.0,34.0],[46.0,33.0],[54.0,34.0],[62.0,38.0],[68.0,55.0],[68.0,60.0],[66.0,67.0],[66.0,70.0],[66.0,75.0],[73.0,81.0],],[[42.0,24.0],[53.0,15.0],],],
|
136
|
+
'â' => [[[52.0,79.0],[46.0,79.0],[37.0,75.0],[34.0,68.0],[36.0,59.0],[45.0,54.0],[60.0,53.0],[67.0,72.0],[52.0,80.0],],[[34.0,42.0],[39.0,39.0],[53.0,34.0],[60.0,37.0],[68.0,55.0],[68.0,64.0],[67.0,73.0],[67.0,77.0],[70.0,81.0],[75.0,82.0],],[[39.0,26.0],[48.0,16.0],[62.0,28.0],],],
|
137
|
+
'ã' => [[[68.0,63.0],[66.0,71.0],[53.0,83.0],[46.0,83.0],[40.0,82.0],[36.0,67.0],[36.0,60.0],[37.0,53.0],[44.0,48.0],[51.0,46.0],[60.0,47.0],[70.0,63.0],],[[37.0,36.0],[47.0,28.0],[61.0,30.0],[69.0,58.0],[69.0,66.0],[69.0,72.0],[71.0,79.0],[73.0,83.0],],[[37.0,19.0],[40.0,16.0],[47.0,11.0],[53.0,18.0],[56.0,22.0],[63.0,22.0],[65.0,19.0],[67.0,17.0],[69.0,13.0],],],
|
138
|
+
'ä' => [[[59.0,80.0],[54.0,81.0],[49.0,81.0],[38.0,79.0],[35.0,73.0],[35.0,68.0],[38.0,63.0],[44.0,60.0],[54.0,58.0],[61.0,62.0],[66.0,76.0],[60.0,81.0],],[[35.0,48.0],[39.0,45.0],[47.0,40.0],[55.0,38.0],[60.0,44.0],[65.0,63.0],[65.0,68.0],[66.0,76.0],[68.0,80.0],[72.0,82.0],[75.0,81.0],],[[42.0,28.0],[40.0,28.0],[38.0,27.0],[37.0,24.0],[39.0,22.0],[42.0,22.0],[45.0,28.0],[43.0,30.0],],[[55.0,29.0],[53.0,29.0],[52.0,26.0],[52.0,24.0],[60.0,27.0],[56.0,30.0],],],
|
139
|
+
'å' => [[[54.0,80.0],[39.0,75.0],[36.0,69.0],[35.0,62.0],[41.0,56.0],[47.0,54.0],[58.0,54.0],[62.0,56.0],[66.0,63.0],[67.0,67.0],[63.0,76.0],[55.0,81.0],],[[36.0,44.0],[41.0,37.0],[44.0,34.0],[50.0,32.0],[54.0,32.0],[61.0,33.0],[65.0,38.0],[69.0,57.0],[69.0,62.0],[68.0,71.0],[69.0,76.0],[73.0,81.0],[75.0,81.0],],[[52.0,24.0],[48.0,23.0],[46.0,21.0],[46.0,18.0],[48.0,15.0],[52.0,15.0],[54.0,16.0],[56.0,19.0],[57.0,24.0],[53.0,25.0],],],
|
129
140
|
'ù' => [[[33.0,44.0],[33.0,52.0],[35.0,63.0],[40.0,72.0],[44.0,78.0],[49.0,79.0],[54.0,80.0],[61.0,77.0],[64.0,72.0],[67.0,62.0],[68.0,47.0],],[[68.0,80.0],[68.0,53.0],],[[60.0,40.0],[41.0,25.0],],],
|
141
|
+
'ú' => [[[35.0,42.0],[35.0,68.0],[35.0,76.0],[47.0,82.0],[59.0,82.0],[64.0,76.0],[64.0,42.0],[66.0,84.0],],[[45.0,36.0],[60.0,25.0],],],
|
142
|
+
'û' => [[[33.0,42.0],[33.0,66.0],[35.0,72.0],[41.0,78.0],[64.0,76.0],[66.0,55.0],[66.0,44.0],[68.0,79.0],],[[40.0,35.0],[51.0,26.0],[59.0,36.0],],],
|
143
|
+
'ü' => [[[35.0,43.0],[36.0,66.0],[38.0,73.0],[42.0,79.0],[55.0,82.0],[61.0,78.0],[67.0,45.0],[68.0,82.0],],[[46.0,35.0],[43.0,33.0],[40.0,29.0],[44.0,27.0],[47.0,28.0],[48.0,32.0],[46.0,36.0],],[[59.0,36.0],[55.0,32.0],[55.0,29.0],[59.0,27.0],[62.0,30.0],[62.0,34.0],[58.0,37.0],],],
|
144
|
+
'ý' => [[[38.0,75.0],[45.0,82.0],[50.0,81.0],[63.0,35.0],],[[56.0,59.0],[39.0,37.0],],[[47.0,32.0],[56.0,24.0],],],
|
145
|
+
'ÿ' => [[[39.0,74.0],[41.0,79.0],[48.0,82.0],[55.0,76.0],[58.0,62.0],[66.0,34.0],],[[59.0,57.0],[39.0,38.0],],[[47.0,32.0],[43.0,30.0],[42.0,25.0],[46.0,24.0],[49.0,27.0],[48.0,34.0],],[[58.0,33.0],[55.0,30.0],[55.0,26.0],[57.0,25.0],[60.0,26.0],[61.0,28.0],[59.0,33.0],],],
|
130
146
|
'ì' => [[[48.0,81.0],[47.0,42.0],],[[55.0,35.0],[41.0,26.0],],],
|
147
|
+
'í' => [[[42.0,80.0],[57.0,81.0],],[[51.0,81.0],[50.0,40.0],],[[45.0,41.0],[56.0,41.0],],[[47.0,29.0],[55.0,21.0],],],
|
148
|
+
'î' => [[[45.0,81.0],[57.0,82.0],],[[52.0,82.0],[52.0,42.0],],[[48.0,42.0],[57.0,42.0],],[[47.0,28.0],[53.0,21.0],[59.0,30.0],],],
|
149
|
+
'ï' => [[[42.0,82.0],[58.0,81.0],],[[51.0,82.0],[51.0,42.0],],[[45.0,42.0],[59.0,42.0],],[[48.0,29.0],[44.0,30.0],[42.0,29.0],[42.0,26.0],[45.0,23.0],[46.0,24.0],[48.0,28.0],],[[56.0,32.0],[54.0,30.0],[54.0,27.0],[54.0,26.0],[59.0,23.0],[61.0,26.0],[62.0,31.0],[57.0,33.0],],],
|
131
150
|
'É' => [[[79.0,28.0],[21.0,28.0],[21.0,80.0],[76.0,81.0],],[[21.0,52.0],[49.0,55.0],],[[30.0,22.0],[63.0,7.0],],],
|
132
151
|
'È' => [[[79.0,31.0],[20.0,32.0],[22.0,80.0],[80.0,82.0],],[[23.0,54.0],[48.0,56.0],],[[62.0,25.0],[36.0,7.0],],],
|
133
152
|
'Ê' => [[[63.0,81.0],[41.0,82.0],[43.0,39.0],[63.0,40.0],],[[44.0,60.0],[55.0,60.0],],[[45.0,31.0],[52.0,25.0],[58.0,34.0],],],
|
@@ -144,6 +163,7 @@ module ChunkyText::Font
|
|
144
163
|
'Õ' => [[[49.0,80.0],[43.0,78.0],[39.0,76.0],[32.0,72.0],[32.0,62.0],[33.0,54.0],[35.0,46.0],[39.0,40.0],[45.0,35.0],[56.0,34.0],[65.0,61.0],[56.0,78.0],[49.0,80.0],],[[37.0,28.0],[39.0,25.0],[46.0,23.0],[49.0,27.0],[51.0,30.0],[57.0,31.0],[59.0,29.0],[64.0,24.0],],],
|
145
164
|
'Ö' => [[[48.0,81.0],[42.0,81.0],[40.0,80.0],[37.0,77.0],[34.0,63.0],[34.0,56.0],[34.0,51.0],[38.0,44.0],[42.0,39.0],[47.0,38.0],[55.0,41.0],[60.0,45.0],[64.0,60.0],[64.0,67.0],[61.0,73.0],[57.0,78.0],[49.0,82.0],],[[40.0,31.0],[37.0,31.0],[35.0,28.0],[37.0,25.0],[41.0,25.0],[43.0,28.0],[41.0,32.0],],[[56.0,33.0],[51.0,32.0],[50.0,30.0],[53.0,28.0],[55.0,26.0],[59.0,30.0],[59.0,32.0],[56.0,33.0],],],
|
146
165
|
'×' => [[[40.0,59.0],[62.0,40.0],],[[61.0,62.0],[43.0,39.0],],],
|
166
|
+
'÷' => [[[29.0,52.0],[70.0,53.0],],[[51.0,71.0],[45.0,70.0],[41.0,67.0],[42.0,65.0],[47.0,62.0],[52.0,63.0],[55.0,68.0],[52.0,72.0],],[[50.0,43.0],[45.0,42.0],[43.0,38.0],[43.0,33.0],[49.0,32.0],[56.0,36.0],[57.0,41.0],[50.0,45.0],],],
|
147
167
|
'Ø' => [[[51.0,82.0],[44.0,80.0],[36.0,77.0],[31.0,68.0],[30.0,59.0],[30.0,47.0],[32.0,38.0],[36.0,32.0],[43.0,31.0],[52.0,31.0],[58.0,34.0],[65.0,52.0],[66.0,63.0],[64.0,72.0],[59.0,77.0],[53.0,83.0],],[[27.0,81.0],[68.0,29.0],],],
|
148
168
|
'À' => [[[26.0,82.0],[51.0,25.0],[70.0,81.0],],[[40.0,56.0],[62.0,56.0],],[[63.0,23.0],[34.0,6.0],],],
|
149
169
|
'Á' => [[[35.0,80.0],[49.0,35.0],[65.0,80.0],],[[42.0,63.0],[59.0,62.0],],[[43.0,30.0],[56.0,23.0],],],
|
data/font/default_font.rb~
CHANGED
@@ -130,15 +130,42 @@ module ChunkyText::Font
|
|
130
130
|
'ì' => [[[48.0,81.0],[47.0,42.0],],[[55.0,35.0],[41.0,26.0],],],
|
131
131
|
'É' => [[[79.0,28.0],[21.0,28.0],[21.0,80.0],[76.0,81.0],],[[21.0,52.0],[49.0,55.0],],[[30.0,22.0],[63.0,7.0],],],
|
132
132
|
'È' => [[[79.0,31.0],[20.0,32.0],[22.0,80.0],[80.0,82.0],],[[23.0,54.0],[48.0,56.0],],[[62.0,25.0],[36.0,7.0],],],
|
133
|
+
'Ê' => [[[63.0,81.0],[41.0,82.0],[43.0,39.0],[63.0,40.0],],[[44.0,60.0],[55.0,60.0],],[[45.0,31.0],[52.0,25.0],[58.0,34.0],],],
|
134
|
+
'Ë' => [[[60.0,36.0],[40.0,36.0],[40.0,81.0],[61.0,82.0],],[[42.0,58.0],[54.0,59.0],],[[46.0,29.0],[43.0,28.0],[42.0,25.0],[42.0,23.0],[45.0,23.0],[51.0,23.0],[49.0,29.0],[47.0,30.0],],[[59.0,30.0],[57.0,30.0],[54.0,28.0],[55.0,25.0],[57.0,25.0],[60.0,26.0],[61.0,28.0],[59.0,31.0],],],
|
135
|
+
'Ì' => [[[40.0,37.0],[60.0,38.0],],[[50.0,39.0],[50.0,81.0],],[[44.0,81.0],[59.0,82.0],],[[53.0,31.0],[46.0,23.0],],],
|
136
|
+
'Í' => [[[41.0,36.0],[57.0,36.0],],[[49.0,38.0],[49.0,81.0],],[[43.0,80.0],[59.0,80.0],],[[46.0,33.0],[54.0,27.0],],],
|
137
|
+
'Î' => [[[41.0,38.0],[58.0,39.0],],[[50.0,39.0],[51.0,81.0],],[[44.0,80.0],[58.0,80.0],],[[44.0,30.0],[50.0,25.0],[56.0,32.0],],],
|
138
|
+
'Ï' => [[[42.0,36.0],[56.0,37.0],],[[49.0,37.0],[50.0,81.0],],[[43.0,81.0],[59.0,81.0],],[[44.0,31.0],[42.0,28.0],[43.0,26.0],[46.0,26.0],[48.0,28.0],[45.0,32.0],],[[56.0,33.0],[54.0,31.0],[52.0,28.0],[55.0,27.0],[57.0,28.0],[59.0,31.0],[57.0,32.0],],],
|
139
|
+
'Ð' => [[[41.0,81.0],[41.0,31.0],[50.0,31.0],[58.0,35.0],[63.0,41.0],[64.0,65.0],[61.0,72.0],[52.0,78.0],[41.0,82.0],],[[34.0,56.0],[50.0,56.0],],],
|
140
|
+
'Ñ' => [[[37.0,81.0],[41.0,32.0],[64.0,80.0],[66.0,34.0],],[[39.0,25.0],[42.0,21.0],[46.0,18.0],[50.0,20.0],[53.0,25.0],[54.0,28.0],[60.0,28.0],[64.0,26.0],[68.0,20.0],],],
|
133
141
|
'Ò' => [[[51.0,80.0],[41.0,77.0],[26.0,64.0],[24.0,56.0],[26.0,43.0],[36.0,34.0],[55.0,28.0],[67.0,34.0],[73.0,44.0],[75.0,55.0],[70.0,77.0],[50.0,82.0],],[[62.0,24.0],[36.0,8.0],],],
|
142
|
+
'Ó' => [[[42.0,81.0],[36.0,75.0],[33.0,70.0],[32.0,62.0],[31.0,52.0],[30.0,44.0],[36.0,38.0],[45.0,36.0],[54.0,38.0],[62.0,69.0],[49.0,83.0],[43.0,81.0],],[[37.0,30.0],[48.0,23.0],],],
|
143
|
+
'Ô' => [[[52.0,81.0],[48.0,81.0],[36.0,73.0],[33.0,67.0],[34.0,56.0],[38.0,38.0],[48.0,36.0],[56.0,39.0],[60.0,79.0],[53.0,82.0],],[[40.0,28.0],[47.0,22.0],[53.0,29.0],],],
|
144
|
+
'Õ' => [[[49.0,80.0],[43.0,78.0],[39.0,76.0],[32.0,72.0],[32.0,62.0],[33.0,54.0],[35.0,46.0],[39.0,40.0],[45.0,35.0],[56.0,34.0],[65.0,61.0],[56.0,78.0],[49.0,80.0],],[[37.0,28.0],[39.0,25.0],[46.0,23.0],[49.0,27.0],[51.0,30.0],[57.0,31.0],[59.0,29.0],[64.0,24.0],],],
|
145
|
+
'Ö' => [[[48.0,81.0],[42.0,81.0],[40.0,80.0],[37.0,77.0],[34.0,63.0],[34.0,56.0],[34.0,51.0],[38.0,44.0],[42.0,39.0],[47.0,38.0],[55.0,41.0],[60.0,45.0],[64.0,60.0],[64.0,67.0],[61.0,73.0],[57.0,78.0],[49.0,82.0],],[[40.0,31.0],[37.0,31.0],[35.0,28.0],[37.0,25.0],[41.0,25.0],[43.0,28.0],[41.0,32.0],],[[56.0,33.0],[51.0,32.0],[50.0,30.0],[53.0,28.0],[55.0,26.0],[59.0,30.0],[59.0,32.0],[56.0,33.0],],],
|
146
|
+
'×' => [[[40.0,59.0],[62.0,40.0],],[[61.0,62.0],[43.0,39.0],],],
|
147
|
+
'Ø' => [[[51.0,82.0],[44.0,80.0],[36.0,77.0],[31.0,68.0],[30.0,59.0],[30.0,47.0],[32.0,38.0],[36.0,32.0],[43.0,31.0],[52.0,31.0],[58.0,34.0],[65.0,52.0],[66.0,63.0],[64.0,72.0],[59.0,77.0],[53.0,83.0],],[[27.0,81.0],[68.0,29.0],],],
|
134
148
|
'À' => [[[26.0,82.0],[51.0,25.0],[70.0,81.0],],[[40.0,56.0],[62.0,56.0],],[[63.0,23.0],[34.0,6.0],],],
|
149
|
+
'Á' => [[[35.0,80.0],[49.0,35.0],[65.0,80.0],],[[42.0,63.0],[59.0,62.0],],[[43.0,30.0],[56.0,23.0],],],
|
150
|
+
'Â' => [[[34.0,81.0],[49.0,35.0],[64.0,82.0],],[[44.0,62.0],[58.0,62.0],],[[41.0,33.0],[49.0,24.0],[58.0,33.0],],[],],
|
151
|
+
'Ã' => [[[34.0,81.0],[48.0,34.0],[62.0,81.0],],[[43.0,60.0],[57.0,60.0],],[[38.0,29.0],[41.0,25.0],[44.0,23.0],[49.0,23.0],[55.0,31.0],[58.0,31.0],[61.0,28.0],[63.0,26.0],],],
|
152
|
+
'Ä' => [[[33.0,81.0],[48.0,32.0],[63.0,81.0],],[[41.0,60.0],[56.0,60.0],],[[37.0,24.0],[36.0,20.0],[40.0,19.0],[40.0,22.0],[40.0,23.0],[38.0,23.0],],[[56.0,24.0],[54.0,24.0],[52.0,22.0],[52.0,21.0],[54.0,19.0],[57.0,20.0],[59.0,22.0],[59.0,23.0],[56.0,24.0],],],
|
153
|
+
'Å' => [[[34.0,82.0],[49.0,30.0],[67.0,82.0],],[[43.0,58.0],[60.0,57.0],],[[50.0,32.0],[45.0,30.0],[44.0,27.0],[44.0,23.0],[49.0,22.0],[53.0,23.0],[54.0,27.0],[54.0,31.0],[50.0,31.0],],],
|
154
|
+
'Æ' => [[[30.0,81.0],[48.0,38.0],[51.0,80.0],[68.0,81.0],],[[38.0,61.0],[50.0,62.0],],[[49.0,57.0],[60.0,58.0],],[[49.0,38.0],[64.0,39.0],],],
|
155
|
+
'Ç' => [[[59.0,27.0],[49.0,29.0],[42.0,29.0],[34.0,34.0],[32.0,41.0],[31.0,50.0],[33.0,60.0],[37.0,65.0],[45.0,67.0],[56.0,67.0],[62.0,66.0],],[[46.0,70.0],[49.0,72.0],[52.0,74.0],[52.0,75.0],[47.0,77.0],[47.0,79.0],[51.0,82.0],[51.0,82.0],[56.0,85.0],],],
|
135
156
|
'Ù' => [[[27.0,30.0],[28.0,42.0],[27.0,60.0],[35.0,74.0],[48.0,81.0],[58.0,82.0],[70.0,76.0],[73.0,65.0],[73.0,39.0],[74.0,30.0],],[[61.0,28.0],[38.0,7.0],],],
|
157
|
+
'Ú' => [[[34.0,38.0],[33.0,47.0],[32.0,57.0],[37.0,76.0],[53.0,82.0],[58.0,82.0],[61.0,62.0],[62.0,51.0],[61.0,38.0],],[[41.0,32.0],[53.0,23.0],],],
|
158
|
+
'Û' => [[[34.0,37.0],[35.0,44.0],[36.0,62.0],[36.0,74.0],[44.0,78.0],[52.0,82.0],[60.0,79.0],[61.0,67.0],[61.0,58.0],[61.0,37.0],],[[39.0,30.0],[47.0,23.0],[56.0,31.0],],],
|
159
|
+
'Ü' => [[[36.0,37.0],[37.0,59.0],[37.0,68.0],[44.0,77.0],[52.0,81.0],[59.0,80.0],[63.0,55.0],[63.0,39.0],],[[43.0,32.0],[39.0,29.0],[39.0,25.0],[42.0,23.0],[46.0,24.0],[47.0,27.0],[44.0,34.0],],[[57.0,35.0],[54.0,32.0],[57.0,24.0],[61.0,26.0],[63.0,29.0],[61.0,34.0],[58.0,35.0],],],
|
160
|
+
'Ý' => [[[48.0,80.0],[47.0,48.0],[31.0,27.0],],[[48.0,49.0],[61.0,29.0],],[[43.0,26.0],[52.0,17.0],],],
|
161
|
+
'Þ' => [[[41.0,74.0],[41.0,30.0],],[[42.0,42.0],[49.0,40.0],[56.0,41.0],[61.0,45.0],[62.0,63.0],[48.0,68.0],[42.0,66.0],],],
|
136
162
|
'¬' => [[[23.0,45.0],[79.0,44.0],[78.0,63.0],],],
|
137
163
|
'¹' => [[[23.0,31.0],[35.0,23.0],[36.0,42.0],],],
|
138
164
|
'²' => [[[45.0,42.0],[28.0,42.0],[42.0,34.0],[46.0,28.0],[45.0,25.0],[41.0,21.0],[34.0,21.0],[29.0,26.0],],],
|
139
165
|
'³' => [[[32.0,26.0],[35.0,23.0],[39.0,22.0],[42.0,24.0],[45.0,28.0],[40.0,32.0],[43.0,34.0],[46.0,38.0],[42.0,42.0],[38.0,43.0],[33.0,41.0],[32.0,38.0],],],
|
140
|
-
'¼' => [[[30.0,43.0],[45.0,43.0],],[[38.0,45.0],[38.0,23.0],[38.0,23.0],[29.0,31.0],],[[34.0,73.0],[67.0,33.0],],[[61.0,53.0],[60.0,74.0],[76.0,75.0],],[[69.0,81.0],[69.0,69.0],],],
|
141
166
|
'½' => [[[28.0,43.0],[50.0,42.0],],[[41.0,44.0],[42.0,22.0],[33.0,31.0],],[[31.0,69.0],[75.0,35.0],],[[78.0,76.0],[58.0,76.0],[74.0,66.0],[76.0,60.0],[76.0,56.0],[71.0,53.0],[64.0,53.0],[60.0,59.0],],],
|
167
|
+
'¼' => [[[30.0,43.0],[45.0,43.0],],[[38.0,45.0],[38.0,23.0],[38.0,23.0],[29.0,31.0],],[[34.0,73.0],[67.0,33.0],],[[61.0,53.0],[60.0,74.0],[76.0,75.0],],[[69.0,81.0],[69.0,69.0],],],
|
168
|
+
'¾' => [[[33.0,24.0],[41.0,24.0],[44.0,27.0],[45.0,33.0],[41.0,35.0],[37.0,36.0],[35.0,35.0],[40.0,36.0],[43.0,39.0],[44.0,43.0],[43.0,47.0],[39.0,47.0],[36.0,46.0],[33.0,45.0],],[[39.0,63.0],[62.0,38.0],],[[58.0,52.0],[57.0,71.0],[74.0,73.0],],[[65.0,81.0],[68.0,64.0],],],
|
142
169
|
'ł' => [[[36.0,81.0],[67.0,80.0],],[[51.0,82.0],[51.0,24.0],[39.0,26.0],],[[41.0,60.0],[62.0,45.0],],],
|
143
170
|
'¶' => [[[46.0,82.0],[49.0,23.0],[29.0,26.0],[24.0,33.0],[24.0,41.0],[28.0,46.0],[41.0,48.0],[48.0,50.0],],[[55.0,81.0],[57.0,25.0],[49.0,24.0],],[[43.0,46.0],[44.0,30.0],[39.0,30.0],[35.0,32.0],[31.0,36.0],[31.0,40.0],[35.0,42.0],[39.0,44.0],[44.0,46.0],],],
|
144
171
|
'ŧ' => [[[36.0,28.0],[37.0,64.0],[41.0,71.0],[48.0,77.0],[56.0,76.0],[63.0,73.0],],[[24.0,39.0],[56.0,40.0],],[[28.0,59.0],[49.0,59.0],],],
|
@@ -159,6 +186,18 @@ module ChunkyText::Font
|
|
159
186
|
'¢' => [[[62.0,28.0],[52.0,28.0],[42.0,28.0],[32.0,34.0],[28.0,53.0],[30.0,61.0],[42.0,68.0],[49.0,71.0],[61.0,70.0],],[[52.0,74.0],[44.0,78.0],],],
|
160
187
|
'“' => [[[39.0,42.0],[52.0,26.0],[50.0,43.0],],[[58.0,45.0],[68.0,30.0],[68.0,47.0],],[],],
|
161
188
|
'”' => [[[42.0,26.0],[41.0,45.0],[54.0,29.0],],[[62.0,31.0],[60.0,47.0],[72.0,33.0],],],
|
189
|
+
'¡' => [[[50.0,80.0],[49.0,41.0],],[[51.0,24.0],[51.0,29.0],[49.0,27.0],[51.0,25.0],],],
|
190
|
+
'¤' => [[[39.0,68.0],[44.0,65.0],[42.0,64.0],[40.0,60.0],[40.0,56.0],[40.0,52.0],[44.0,48.0],[47.0,46.0],[42.0,41.0],],[[48.0,47.0],[50.0,46.0],[53.0,46.0],[57.0,48.0],[60.0,51.0],[65.0,45.0],],[[61.0,51.0],[63.0,59.0],[63.0,63.0],[59.0,66.0],[65.0,70.0],],[[60.0,67.0],[54.0,70.0],[46.0,66.0],],],
|
191
|
+
'¥' => [[[50.0,80.0],[49.0,45.0],[31.0,23.0],],[[51.0,47.0],[63.0,26.0],],[[41.0,55.0],[60.0,55.0],],[[41.0,61.0],[59.0,60.0],],],
|
192
|
+
'¨' => [[[36.0,36.0],[33.0,32.0],[36.0,28.0],[41.0,27.0],[44.0,36.0],[38.0,38.0],],[[57.0,38.0],[54.0,36.0],[52.0,32.0],[54.0,30.0],[58.0,30.0],[63.0,34.0],[62.0,38.0],[59.0,39.0],],],
|
193
|
+
'©' => [[[53.0,82.0],[41.0,78.0],[35.0,74.0],[30.0,64.0],[28.0,54.0],[26.0,46.0],[32.0,37.0],[38.0,33.0],[51.0,27.0],[74.0,39.0],[79.0,51.0],[74.0,72.0],[70.0,78.0],[53.0,82.0],],[[65.0,47.0],[61.0,42.0],[55.0,39.0],[47.0,39.0],[43.0,43.0],[39.0,48.0],[39.0,54.0],[40.0,61.0],[44.0,66.0],[49.0,69.0],[54.0,71.0],[58.0,68.0],[61.0,66.0],[64.0,62.0],],],
|
194
|
+
'ª' => [[[49.0,43.0],[44.0,41.0],[42.0,37.0],[45.0,31.0],[47.0,32.0],[54.0,32.0],[58.0,37.0],[57.0,44.0],[52.0,45.0],],[[44.0,25.0],[49.0,25.0],[52.0,27.0],[58.0,28.0],[59.0,39.0],[60.0,45.0],[63.0,47.0],],],
|
195
|
+
'®' => [[[49.0,81.0],[43.0,78.0],[33.0,75.0],[30.0,71.0],[26.0,63.0],[26.0,55.0],[26.0,47.0],[30.0,37.0],[35.0,32.0],[46.0,27.0],[57.0,24.0],[75.0,38.0],[78.0,46.0],[77.0,65.0],[74.0,72.0],[67.0,77.0],[61.0,80.0],[51.0,82.0],],[[42.0,74.0],[42.0,38.0],[47.0,35.0],[53.0,35.0],[58.0,35.0],[63.0,38.0],[65.0,44.0],[65.0,54.0],[60.0,57.0],[50.0,59.0],[44.0,58.0],[65.0,75.0],],],
|
196
|
+
'±' => [[[47.0,27.0],[49.0,59.0],],[[31.0,44.0],[67.0,44.0],],[[33.0,73.0],[67.0,73.0],],],
|
197
|
+
'·' => [[[50.0,52.0],[46.0,49.0],[47.0,47.0],[51.0,45.0],[56.0,46.0],[56.0,51.0],[55.0,55.0],[51.0,54.0],],],
|
198
|
+
'¸' => [[[46.0,72.0],[50.0,72.0],[54.0,74.0],[53.0,78.0],[52.0,79.0],[47.0,79.0],],],
|
199
|
+
'¿' => [[[49.0,35.0],[44.0,33.0],[43.0,29.0],[47.0,26.0],[51.0,28.0],[54.0,31.0],[54.0,35.0],[49.0,36.0],],[[50.0,44.0],[48.0,56.0],[45.0,60.0],[41.0,63.0],[34.0,66.0],[34.0,74.0],[39.0,79.0],[50.0,82.0],[55.0,82.0],[60.0,81.0],[62.0,76.0],[61.0,71.0],],],
|
200
|
+
|
162
201
|
' ' => [],
|
163
202
|
}
|
164
203
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chunky_text
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marco Bagnaresi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -59,7 +59,8 @@ description: |+
|
|
59
59
|
Accented italian/english chars, uppercase and lowercase, special charactes in
|
60
60
|
a default font are included.
|
61
61
|
|
62
|
-
|
62
|
+
|
63
|
+
*MBCRAFT di Marco Bagnaresi*
|
63
64
|
|
64
65
|
email: info@mbcraft.it
|
65
66
|
executables: []
|
@@ -70,7 +71,6 @@ files:
|
|
70
71
|
- README
|
71
72
|
- chunky_text.gemspec
|
72
73
|
- chunky_text.rb
|
73
|
-
- chunky_text.rb~
|
74
74
|
- font/default_font.rb
|
75
75
|
- font/default_font.rb~
|
76
76
|
- font_metrics.rb
|
data/chunky_text.rb~
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
|
2
|
-
require './chunky_text/font_metrics'
|
3
|
-
|
4
|
-
module ChunkyText
|
5
|
-
|
6
|
-
=begin rdoc
|
7
|
-
This class is used to write vector text over images. It's the only exposed class.
|
8
|
-
Actually 'default_font' is the only font included.
|
9
|
-
Example :
|
10
|
-
|
11
|
-
img = ChunkyPNG::Image.new(600, 300, ChunkyPNG::Color::WHITE)
|
12
|
-
wr = ChunkyText::Writer.new(img,'default_font')
|
13
|
-
wr.size = 30
|
14
|
-
wr.color = ChunkyPNG::Color::BLACK
|
15
|
-
wr.write("CHUNKY",100,150)
|
16
|
-
wr.write("~TEXT~",130,220)
|
17
|
-
img.save("my_sample.png")
|
18
|
-
|
19
|
-
=end
|
20
|
-
|
21
|
-
class Writer
|
22
|
-
|
23
|
-
attr_reader :scale_factor
|
24
|
-
attr_accessor :color
|
25
|
-
|
26
|
-
=begin rdoc
|
27
|
-
Initializes a writer for the specified image using the specified font name.
|
28
|
-
Params :
|
29
|
-
- img : a chunky_png image
|
30
|
-
- font_name : the name without extension of the font file inside the font directory.
|
31
|
-
=end
|
32
|
-
def initialize(img,font_name)
|
33
|
-
@img = img
|
34
|
-
@font_metrics = ChunkyText::FontMetrics.new(font_name)
|
35
|
-
@color = ChunkyPNG::Color::BLACK
|
36
|
-
@scale_factor = 1.0
|
37
|
-
end
|
38
|
-
=begin rdoc
|
39
|
-
Sets the (approximate) size in pixel of the font.
|
40
|
-
Params :
|
41
|
-
- px : integer size in pixels of font height
|
42
|
-
=end
|
43
|
-
def size=(px)
|
44
|
-
@scale_factor = px.to_f/@font_metrics.char_size.to_f
|
45
|
-
end
|
46
|
-
|
47
|
-
=begin rdoc
|
48
|
-
Writes a string of text in position x and y.
|
49
|
-
Params :
|
50
|
-
- text : a string of text to write
|
51
|
-
- x : integer position
|
52
|
-
- y : integer position
|
53
|
-
=end
|
54
|
-
def write(text,x,y)
|
55
|
-
caret_x = x
|
56
|
-
text.chars.each do |ch|
|
57
|
-
caret_x+= @font_metrics.write_char(@img,caret_x,y,ch,@scale_factor,@color) + (@font_metrics.char_spacing*@scale_factor)
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
end
|