README.md in letter_avatar-0.3.7 vs README.md in letter_avatar-0.3.8
- old
+ new
@@ -76,10 +76,20 @@
config.colors_palette = :custom
config.custom_palette = [[120, 132, 205], [91, 149, 249], [72, 194, 249], [69, 208, 226]]
end
```
+##### Custom font definition
+
+You can define your own `custom` palette:
+
+```ruby
+LetterAvatar.setup do |config|
+ config.font = File.join(File.expand_path('../../', File.dirname(__FILE__)), 'app/assets/fonts', 'font_name.ext')
+end
+```
+
## Usage
```ruby
LetterAvatar.generate 'ksz2k', 200
=> "public/system/letter_avatars/2/K/87_178_230/200.png"
@@ -111,9 +121,11 @@
### In your model
Say, you have a model `User` (which must have attribute or method `name`)
```ruby
+require 'letter_avatar/has_avatar'
+
class User
include LetterAvatar::HasAvatar
...
def name