rack-fontserve 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -30,12 +30,27 @@ setting the fonts path and mounting the app in your routes.rb file:
30
30
 
31
31
  mount Rack::Fontserve, :at => "/fonts"
32
32
 
33
- You can see a demo of all fonts in the fonts_path at /demo
33
+ You can see a demo of all fonts in the fonts_path at /demo.
34
+
35
+ The font name is the name of the font's directory, so in the above example, the font would be called 'iconic_stroke'.
36
+
37
+ == Custom font CSS
38
+
39
+ When a `font_name.css` file is found in the subdirectory, this file will be rendered instead of the auto-generated css. If you
40
+ want to tweak your css settings, copy and paste the auto-generated css into such a file and customize it to your liking!
41
+
42
+ == Incorporate font licenses into CSS
43
+
44
+ If you place a text file named LICENSE inside some font's subdirectory, this file's content will automatically be added as a
45
+ CSS comment at the top of your auto-generated CSS. This won't happen when using custom css, so make sure your custom css has
46
+ the license added as you want it.
47
+
34
48
 
35
49
  == TODO
36
50
 
37
51
  * Improve the CSS syntax (kill unneccessary blank lines)
38
52
  * Make the scope selector for svg fonts configurable
53
+ * Make the fall-back fonts configurable
39
54
  * Add an "all.css" action that aggregates all fonts into one file
40
55
 
41
56
  == Note on Patches/Pull Requests
@@ -2,4 +2,4 @@
2
2
  # Rack::Fontserve::VERSION since Fontserve is a class that inherits from Sinatra::Base
3
3
  # and we'd be getting Superclass mismatch errors here since Sinatra is
4
4
  # unavailable when evaluating this file standalone, i.e. in Rakefile
5
- FONTSERVE_VERSION = '0.1.0'
5
+ FONTSERVE_VERSION = '0.1.1'
@@ -6,13 +6,28 @@
6
6
  <% end %>
7
7
  <style type="text/css">
8
8
  body {
9
- text-align: center;
9
+ text-align: center;
10
+ padding: 0; margin: 0;
10
11
  font-size: 180%;
11
12
  background: #ddd;
12
- padding-top: 35px;
13
13
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
14
14
  }
15
- h1,h2,h3 {
15
+ h1 {
16
+ background-color: #222526;
17
+ padding: 40px 20px;
18
+ margin: 0;
19
+ color: #7F203B;
20
+ font-size: 72px;
21
+ text-shadow: #D94F00 2px 2px 0px, #F28D00 4px 4px 0px, #FFBB6E 6px 6px 0px;
22
+ border-bottom: 4px solid black;
23
+ }
24
+
25
+ footer, footer a {
26
+ color: #777;
27
+ font-size: 13px;
28
+ }
29
+
30
+ h2 {
16
31
  text-shadow: white 1px 1px 1px;
17
32
  }
18
33
 
@@ -30,6 +45,9 @@
30
45
  <p>The quick brown fox jumps over the lazy dog (possibly)</p>
31
46
  </div>
32
47
  <% end %>
48
+ <footer>
49
+ <a href="https://github.com/colszowka/rack-fontserve">rack-fontserve</a> v<%= FONTSERVE_VERSION %>
50
+ </footer>
33
51
  </body>
34
52
  </html>
35
53
 
@@ -1,6 +1,6 @@
1
1
  <% if @font.license? %>/* LICENSE: <%= @font.license %> */<% end %>
2
2
  @font-face {
3
- font-family: '<%= @font.name %>';
3
+ font-family: '<%= @font.name %>', Helvetica, Arial, sans-serif;
4
4
  <% if format?('eot') %>src: url('<%= "./#{@font.name}.eot" %>');<% end %>
5
5
  src: local('☺'),
6
6
  <% if format?('eot') %>url('<%= "./#{@font.name}.eot?iefix" %>') format('eot'), <% end %>
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rack-fontserve
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Christoph Olszowka