Skip to content

Commit 50406a7

Browse files
committed
Fix bug for bold
1 parent cf74388 commit 50406a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/InitialAvatar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ protected function findFontFile() {
510510
$originalFile = $fontFile;
511511

512512
foreach ( $weightsToTry as $weight ) {
513-
$fontFile = str_replace( '/(\-(Bold|Semibold|Regular))/', $weight, $originalFile );
513+
$fontFile = preg_replace( '/(\-(Bold|Semibold|Regular))/', "-{$weight}", $originalFile );
514514

515515
if ( file_exists( $fontFile ) ) {
516516
return $fontFile;

0 commit comments

Comments
 (0)