hershey 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/hershey +9 -0
- data/hershey.gemspec +1 -1
- data/lib/hershey.rb +5 -0
- data/lib/hershey/document.rb +3 -2
- data/lib/hershey/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b66efface3022d72fefa4018088205dac320f54
|
4
|
+
data.tar.gz: 44954d2d7e45d07e1e336b308edf6f90e6964e46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b956249989149548c9fcd40c1c04d56039484527766385489e0a90122f74372d2821d80d368b4d9c5e0f4f87c0d0caec48143c440cfe4b69e8b768457955fb9b
|
7
|
+
data.tar.gz: 400c6362d3ed6ae09c09237c9cb4225904123fd48303eb6af941bdf4a8ed88cbb83cef3d2ccb3eff7b5d3c8a46a9fd37e778167257e94cc6d2678fcd23a52cb5
|
data/bin/hershey
ADDED
data/hershey.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["me@winstondurand.com"]
|
11
11
|
spec.summary = %q{Generates an SVG with text using the Hershey Vector Font}
|
12
12
|
# spec.description = %q{TODO: Write a longer description. Optional.}
|
13
|
-
|
13
|
+
spec.homepage = "https://github.com/R167/hershey"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
data/lib/hershey.rb
CHANGED
data/lib/hershey/document.rb
CHANGED
@@ -4,7 +4,7 @@ module Hershey
|
|
4
4
|
SIDE = 10.freeze
|
5
5
|
HEIGHT_STRING = "jfdsklahfdjksjhaljfdskahj".freeze
|
6
6
|
|
7
|
-
def initialize(width: 500, height: 500, spacing: 3, vertical: 20)
|
7
|
+
def initialize(width: 500, height: 500, spacing: 3, vertical: 20, font: :futural)
|
8
8
|
@words = []
|
9
9
|
@pages = []
|
10
10
|
@width = width
|
@@ -13,6 +13,7 @@ module Hershey
|
|
13
13
|
@line = BUFFER
|
14
14
|
@vertical = vertical
|
15
15
|
@closed = false
|
16
|
+
@font = font
|
16
17
|
@svg = <<-HEADER
|
17
18
|
<?xml version="1.0" standalone="no"?>
|
18
19
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
@@ -24,7 +25,7 @@ module Hershey
|
|
24
25
|
|
25
26
|
def <<(text)
|
26
27
|
text.split(' ').each do |word|
|
27
|
-
@words << Word.new(word)
|
28
|
+
@words << Word.new(word, font: @font)
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|
data/lib/hershey/version.rb
CHANGED
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.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Winston Durand
|
@@ -55,7 +55,8 @@ dependencies:
|
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- me@winstondurand.com
|
58
|
-
executables:
|
58
|
+
executables:
|
59
|
+
- hershey
|
59
60
|
extensions: []
|
60
61
|
extra_rdoc_files: []
|
61
62
|
files:
|
@@ -64,6 +65,7 @@ files:
|
|
64
65
|
- LICENSE.txt
|
65
66
|
- README.md
|
66
67
|
- Rakefile
|
68
|
+
- bin/hershey
|
67
69
|
- hershey.gemspec
|
68
70
|
- lib/hershey.rb
|
69
71
|
- lib/hershey/character.rb
|
@@ -72,7 +74,7 @@ files:
|
|
72
74
|
- lib/hershey/page.rb
|
73
75
|
- lib/hershey/version.rb
|
74
76
|
- lib/hershey/word.rb
|
75
|
-
homepage:
|
77
|
+
homepage: https://github.com/R167/hershey
|
76
78
|
licenses:
|
77
79
|
- MIT
|
78
80
|
metadata: {}
|