Skip to content

Commit

Permalink
Update README, Config (#81)
Browse files Browse the repository at this point in the history
* Update Readme

* Update Config
  • Loading branch information
ahinkle authored and uyab committed Oct 7, 2019
1 parent fe8b30b commit cc7f1e7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,19 @@ return [
| Avatar use Intervention Image library to process image.
| Meanwhile, Intervention Image supports "GD Library" and "Imagick" to process images
| internally. You may choose one of them according to your PHP
| configuration. By default PHP's "GD Library" implementation is used.
| configuration. By default PHP's "Imagick" implementation is used.
|
| Supported: "gd", "imagick"
|
*/
'driver' => 'gd',
'driver' => 'imagick',

// Initial generator class
'generator' => \Laravolt\Avatar\Generator\DefaultGenerator::class,

// Theme implementation
'decorator' => \Laravolt\Avatar\Theme\Decorator::class,

// Whether all characters supplied must be replaced with their closest ASCII counterparts
'ascii' => false,

Expand All @@ -163,19 +166,16 @@ return [
// font size
'fontSize' => 48,

// Font family to be used in SVG text
'fontFamily' => null,

// convert initial letter to uppercase
// convert initial letter in uppercase
'uppercase' => false,

// Fonts used to render text.
// If contains more than one fonts, randomly selected based on name supplied
'fonts' => ['path/to/OpenSans-Bold.ttf', 'path/to/rockwell.ttf'],
'fonts' => [__DIR__.'/../fonts/OpenSans-Bold.ttf', __DIR__.'/../fonts/rockwell.ttf'],

// List of foreground colors to be used, randomly selected based on name supplied
'foregrounds' => [
'#FFFFFF'
'#FFFFFF',
],

// List of background colors to be used, randomly selected based on name supplied
Expand All @@ -199,22 +199,24 @@ return [

'border' => [
'size' => 1,

// border color, available value are:
// 'foreground' (same as foreground color)
// 'background' (same as background color)
// or any valid hex ('#aabbcc')
'color' => 'foreground'
'color' => 'background',
],

// Note: Theme are available since 3.0.0

// List of theme name to be used when rendering avatar
// Possible values are:
// 1. Theme name as string: 'colorful'
// 2. Or array of string name: ['grayscale-light', 'grayscale-dark']
// 3. Or wildcard "*" to use all defined themes
'theme' => '*',
'theme' => ['*'],

// Predefined themes
// Available theme attributes are:
// shape, chars, backgrounds, foregrounds, fonts, fontSize, width, height, ascii, uppercase, and border.
'themes' => [
'grayscale-light' => [
'backgrounds' => ['#edf2f7', '#e2e8f0', '#cbd5e0'],
Expand Down Expand Up @@ -244,7 +246,7 @@ return [
],
'foregrounds' => ['#FFFFFF'],
],
]
]
];

```
Expand Down
2 changes: 1 addition & 1 deletion config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
| Avatar use Intervention Image library to process image.
| Meanwhile, Intervention Image supports "GD Library" and "Imagick" to process images
| internally. You may choose one of them according to your PHP
| configuration. By default PHP's "GD Library" implementation is used.
| configuration. By default PHP's "Imagick" implementation is used.
|
| Supported: "gd", "imagick"
|
Expand Down

0 comments on commit cc7f1e7

Please sign in to comment.