flurin-buttonize 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "buttonize"
3
- s.version = "0.1.2"
3
+ s.version = "0.1.4"
4
4
  s.date = "2009-01-25"
5
5
 
6
6
  s.authors = ["Flurin Egger"]
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  examples/default/big_red_left.gif
24
24
  examples/default/big_red_middle.gif
25
25
  examples/default/big_red_right.gif
26
- examples/default/fonts/Bitstream Vera License.txt
26
+ examples/default/fonts/Bitstream\ Vera\ License.txt
27
27
  examples/default/fonts/Vera-Bold-Italic.ttf
28
28
  examples/default/fonts/Vera-Bold.ttf
29
29
  examples/default/fonts/Vera-Italic.ttf
@@ -1,6 +1,6 @@
1
1
  require File.dirname(__FILE__) + "/../lib/buttonize"
2
2
 
3
- buttons = Buttonize::ButtonSet.define(:style_file => File.dirname(__FILE__) + "/default/styles.rb", :style_set => :default) do |set|
3
+ buttons = Buttonize::ButtonSet.define(:style_set => :default) do |set|
4
4
 
5
5
  set.button "Test", :style => :small_green
6
6
 
@@ -0,0 +1,123 @@
1
+ Bitstream Vera Fonts Copyright
2
+
3
+ The fonts have a generous copyright, allowing derivative works (as
4
+ long as "Bitstream" or "Vera" are not in the names), and full
5
+ redistribution (so long as they are not *sold* by themselves). They
6
+ can be be bundled, redistributed and sold with any software.
7
+
8
+ The fonts are distributed under the following copyright:
9
+
10
+ Copyright
11
+ =========
12
+
13
+ Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream
14
+ Vera is a trademark of Bitstream, Inc.
15
+
16
+ Permission is hereby granted, free of charge, to any person obtaining
17
+ a copy of the fonts accompanying this license ("Fonts") and associated
18
+ documentation files (the "Font Software"), to reproduce and distribute
19
+ the Font Software, including without limitation the rights to use,
20
+ copy, merge, publish, distribute, and/or sell copies of the Font
21
+ Software, and to permit persons to whom the Font Software is furnished
22
+ to do so, subject to the following conditions:
23
+
24
+ The above copyright and trademark notices and this permission notice
25
+ shall be included in all copies of one or more of the Font Software
26
+ typefaces.
27
+
28
+ The Font Software may be modified, altered, or added to, and in
29
+ particular the designs of glyphs or characters in the Fonts may be
30
+ modified and additional glyphs or characters may be added to the
31
+ Fonts, only if the fonts are renamed to names not containing either
32
+ the words "Bitstream" or the word "Vera".
33
+
34
+ This License becomes null and void to the extent applicable to Fonts
35
+ or Font Software that has been modified and is distributed under the
36
+ "Bitstream Vera" names.
37
+
38
+ The Font Software may be sold as part of a larger software package but
39
+ no copy of one or more of the Font Software typefaces may be sold by
40
+ itself.
41
+
42
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
43
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
44
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
45
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
46
+ BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR
47
+ OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
48
+ OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
49
+ OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
50
+ SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
51
+
52
+ Except as contained in this notice, the names of Gnome, the Gnome
53
+ Foundation, and Bitstream Inc., shall not be used in advertising or
54
+ otherwise to promote the sale, use or other dealings in this Font
55
+ Software without prior written authorization from the Gnome Foundation
56
+ or Bitstream Inc., respectively. For further information, contact:
57
+ fonts at gnome dot org.
58
+
59
+ Copyright FAQ
60
+ =============
61
+
62
+ 1. I don't understand the resale restriction... What gives?
63
+
64
+ Bitstream is giving away these fonts, but wishes to ensure its
65
+ competitors can't just drop the fonts as is into a font sale system
66
+ and sell them as is. It seems fair that if Bitstream can't make money
67
+ from the Bitstream Vera fonts, their competitors should not be able to
68
+ do so either. You can sell the fonts as part of any software package,
69
+ however.
70
+
71
+ 2. I want to package these fonts separately for distribution and
72
+ sale as part of a larger software package or system. Can I do so?
73
+
74
+ Yes. A RPM or Debian package is a "larger software package" to begin
75
+ with, and you aren't selling them independently by themselves.
76
+ See 1. above.
77
+
78
+ 3. Are derivative works allowed?
79
+ Yes!
80
+
81
+ 4. Can I change or add to the font(s)?
82
+ Yes, but you must change the name(s) of the font(s).
83
+
84
+ 5. Under what terms are derivative works allowed?
85
+
86
+ You must change the name(s) of the fonts. This is to ensure the
87
+ quality of the fonts, both to protect Bitstream and Gnome. We want to
88
+ ensure that if an application has opened a font specifically of these
89
+ names, it gets what it expects (though of course, using fontconfig,
90
+ substitutions could still could have occurred during font
91
+ opening). You must include the Bitstream copyright. Additional
92
+ copyrights can be added, as per copyright law. Happy Font Hacking!
93
+
94
+ 6. If I have improvements for Bitstream Vera, is it possible they might get
95
+ adopted in future versions?
96
+
97
+ Yes. The contract between the Gnome Foundation and Bitstream has
98
+ provisions for working with Bitstream to ensure quality additions to
99
+ the Bitstream Vera font family. Please contact us if you have such
100
+ additions. Note, that in general, we will want such additions for the
101
+ entire family, not just a single font, and that you'll have to keep
102
+ both Gnome and Jim Lyles, Vera's designer, happy! To make sense to add
103
+ glyphs to the font, they must be stylistically in keeping with Vera's
104
+ design. Vera cannot become a "ransom note" font. Jim Lyles will be
105
+ providing a document describing the design elements used in Vera, as a
106
+ guide and aid for people interested in contributing to Vera.
107
+
108
+ 7. I want to sell a software package that uses these fonts: Can I do so?
109
+
110
+ Sure. Bundle the fonts with your software and sell your software
111
+ with the fonts. That is the intent of the copyright.
112
+
113
+ 8. If applications have built the names "Bitstream Vera" into them,
114
+ can I override this somehow to use fonts of my choosing?
115
+
116
+ This depends on exact details of the software. Most open source
117
+ systems and software (e.g., Gnome, KDE, etc.) are now converting to
118
+ use fontconfig (see www.fontconfig.org) to handle font configuration,
119
+ selection and substitution; it has provisions for overriding font
120
+ names and subsituting alternatives. An example is provided by the
121
+ supplied local.conf file, which chooses the family Bitstream Vera for
122
+ "sans", "serif" and "monospace". Other software (e.g., the XFree86
123
+ core server) has other mechanisms for font substitution.
@@ -1,6 +1,7 @@
1
1
  require 'thor'
2
2
 
3
3
  module Buttonize
4
+ EXAMPLE_STYLE_FILE = File.join(File.dirname(__FILE__),"../../examples/default/styles.rb")
4
5
 
5
6
  class CLI < Thor
6
7
 
@@ -25,6 +26,10 @@ module Buttonize
25
26
  require buttonset
26
27
  raise "Are you sure #{buttonset} is a buttonset file?" if !ButtonSet.current
27
28
 
29
+ if !ButtonSet.current.options[:style_file]
30
+ require EXAMPLE_STYLE_FILE
31
+ end
32
+
28
33
  puts "Generating buttons...."
29
34
  ButtonSet.current.send(:generate_buttons,options)
30
35
  end
@@ -34,7 +39,7 @@ module Buttonize
34
39
  :style_set => :optional, # The styleset to use. Defaults to "default"
35
40
  :style => :required # The button style to use.
36
41
  def button(text,outfile=nil)
37
- options = {"style_file" => File.join(File.dirname(__FILE__),"../../examples/default/styles.rb"), "style_set" => :default}.update(self.options)
42
+ options = {"style_file" => EXAMPLE_STYLE_FILE, "style_set" => :default}.update(self.options)
38
43
  style = get_style(options["style_file"],options["style_set"],options["style"])
39
44
  Buttonize::Button.new(style).generate(text,outfile)
40
45
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flurin-buttonize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flurin Egger
@@ -14,6 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rmagick
17
+ type: :runtime
17
18
  version_requirement:
18
19
  version_requirements: !ruby/object:Gem::Requirement
19
20
  requirements:
@@ -23,6 +24,7 @@ dependencies:
23
24
  version:
24
25
  - !ruby/object:Gem::Dependency
25
26
  name: wycats-thor
27
+ type: :runtime
26
28
  version_requirement:
27
29
  version_requirements: !ruby/object:Gem::Requirement
28
30
  requirements:
@@ -54,9 +56,7 @@ files:
54
56
  - examples/default/big_red_left.gif
55
57
  - examples/default/big_red_middle.gif
56
58
  - examples/default/big_red_right.gif
57
- - examples/default/fonts/Bitstream
58
- - Vera
59
- - License.txt
59
+ - examples/default/fonts/Bitstream Vera License.txt
60
60
  - examples/default/fonts/Vera-Bold-Italic.ttf
61
61
  - examples/default/fonts/Vera-Bold.ttf
62
62
  - examples/default/fonts/Vera-Italic.ttf