Commit 5ee9619c1d675d4e789c12600b322aa0f2b4c011
1 parent
fae0b855
Exists in
master
Use Google Roboto font, version 0.1.0
Showing
5 changed files
with
6 additions
and
4 deletions
Show diff stats
README.md
... | ... | @@ -8,7 +8,7 @@ Code extracted from discourse source (thanks guys!) - I needed this functionalit |
8 | 8 | |
9 | 9 | ## Examples |
10 | 10 | |
11 | -              | |
11 | +              | |
12 | 12 | |
13 | 13 | ## Installation |
14 | 14 | ... | ... |
No preview for this file type
letter_avatar.gemspec
... | ... | @@ -15,7 +15,7 @@ Gem::Specification.new do |spec| |
15 | 15 | |
16 | 16 | spec.rubyforge_project = "letter_avatar" |
17 | 17 | |
18 | - spec.files = `git ls-files`.split($/) | |
18 | + spec.files = `git ls-files`.split($/) + ['Roboto-Medium'] | |
19 | 19 | spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } |
20 | 20 | spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) |
21 | 21 | spec.require_paths = ["lib"] | ... | ... |
lib/letter_avatar/avatar.rb
... | ... | @@ -70,9 +70,11 @@ module LetterAvatar |
70 | 70 | -size 240x240 |
71 | 71 | xc:#{to_rgb(color)} |
72 | 72 | -pointsize 140 |
73 | + -font Roboto-Medium | |
74 | + -weight 500 | |
73 | 75 | -fill '#{FILL_COLOR}' |
74 | 76 | -gravity Center |
75 | - -annotate -5+20 '#{letter}' | |
77 | + -annotate -0+10 '#{letter}' | |
76 | 78 | '#{filename}' |
77 | 79 | } |
78 | 80 | ... | ... |
lib/letter_avatar/version.rb