Skip to content

Commit a8988ab

Browse files
committed
Minor fix
1 parent 0b63481 commit a8988ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/InitialAvatar.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function generate( $nameOrInitials, $bgColor = '#000', $fontColor = '#fff
2727

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

5454
$names = explode( $nameOrInitials, ' ' );
55+
5556
if ( count( $names ) > 1 )
5657
{
5758
$firstNameLetter = substr( $names[0], 0, 1 );

0 commit comments

Comments
 (0)