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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 22dc629206456a677f535b7c6a252f1660237906
4
- data.tar.gz: c5b64751d8ca070316c6271fc4cf1b54850c95d8
3
+ metadata.gz: 7e42fa452b5bb9c8ce5898bd72e749bcb78ff2b3
4
+ data.tar.gz: ee58cf0a23afa13bacca28601ab7f594379fd6da
5
5
  SHA512:
6
- metadata.gz: d9d1aad7db2c1608194059ee43fe27aa4b509028949c187583d1e293099dcf0e8fc7488640a2fae6b00550b59a8793672b00fc29bacb81ded63a904d2a333fb3
7
- data.tar.gz: dc6005ec15b32459d8fe4948c18f3227c0a66dec98988fe110ae60a4989ff363bed921fae409445d4506034c0bdfd9af0440d235b0547a4a08cbbf4fa8bf7122
6
+ metadata.gz: a47b25b0f7fe5bd54d75597be360bf6ceace6146d62df6ed1fd4891787162b8cd8018cba4dc625b37bd04c1c4a11858696df35b93a0f29a61e893231d74e5e20
7
+ data.tar.gz: bf010c6ce41ef7940d12d891017834bc833eb7d75da86dce19f3cd58f6dd80afa051584a2010b4fbbadf5dbcc019c212b932079c8a30e5f8f4ee374ada64531e
@@ -21,7 +21,6 @@ module Hershey
21
21
  end
22
22
 
23
23
  def self.svgs(text, options = {})
24
- puts options
25
24
  doc = Document.new(options)
26
25
  doc.write(text)
27
26
  doc.svgs
@@ -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
- @@chars ||= {}
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] = {
@@ -1,3 +1,3 @@
1
1
  module Hershey
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hershey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Winston Durand