hershey 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hershey.rb +0 -1
- data/lib/hershey/character.rb +4 -1
- data/lib/hershey/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e42fa452b5bb9c8ce5898bd72e749bcb78ff2b3
|
4
|
+
data.tar.gz: ee58cf0a23afa13bacca28601ab7f594379fd6da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a47b25b0f7fe5bd54d75597be360bf6ceace6146d62df6ed1fd4891787162b8cd8018cba4dc625b37bd04c1c4a11858696df35b93a0f29a61e893231d74e5e20
|
7
|
+
data.tar.gz: bf010c6ce41ef7940d12d891017834bc833eb7d75da86dce19f3cd58f6dd80afa051584a2010b4fbbadf5dbcc019c212b932079c8a30e5f8f4ee374ada64531e
|
data/lib/hershey.rb
CHANGED
data/lib/hershey/character.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
1
3
|
module Hershey
|
2
4
|
class Character
|
3
5
|
OFFSET = ' '.ord
|
@@ -25,7 +27,8 @@ module Hershey
|
|
25
27
|
private
|
26
28
|
|
27
29
|
def info
|
28
|
-
@@
|
30
|
+
@@char_list ||= YAML.load_file(File.join(File.dirname(__FILE__), 'fonts_full.yaml'))[@font]
|
31
|
+
@@chars[@char] ||= @@char_list[@char.to_s.ord - OFFSET]
|
29
32
|
unless @@chars[@char]
|
30
33
|
match = Hershey::FONTS[@font][@char.to_s.ord - OFFSET].match(MATCHER)
|
31
34
|
@@chars[@char] = {
|
data/lib/hershey/version.rb
CHANGED