Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LasseRafn committed Jan 14, 2017
1 parent 0b63481 commit a8988ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/InitialAvatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function generate( $nameOrInitials, $bgColor = '#000', $fontColor = '#fff

$img->text( $this->generateInitials( $nameOrInitials ), 0, 0, function ( $font ) use ( $fontColor, $size, $font )
{
$font->file( "fonts/{$font}.ttf" );
$font->file( "./fonts/{$font}.ttf" );
$font->size( $size * 0.75 );
$font->color( $fontColor );
$font->align( 'center' );
Expand All @@ -52,6 +52,7 @@ private function generateInitials( $nameOrInitials = 'John Doe' )
$nameOrInitials = strtoupper( trim( $nameOrInitials ) );

$names = explode( $nameOrInitials, ' ' );

if ( count( $names ) > 1 )
{
$firstNameLetter = substr( $names[0], 0, 1 );
Expand Down

0 comments on commit a8988ab

Please sign in to comment.