We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf74388 commit 50406a7Copy full SHA for 50406a7
src/InitialAvatar.php
@@ -510,7 +510,7 @@ protected function findFontFile() {
510
$originalFile = $fontFile;
511
512
foreach ( $weightsToTry as $weight ) {
513
- $fontFile = str_replace( '/(\-(Bold|Semibold|Regular))/', $weight, $originalFile );
+ $fontFile = preg_replace( '/(\-(Bold|Semibold|Regular))/', "-{$weight}", $originalFile );
514
515
if ( file_exists( $fontFile ) ) {
516
return $fontFile;
0 commit comments