Skip to content

Commit

Permalink
Fixes #224
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlad Olaru committed Jul 2, 2020
1 parent eb805bc commit 0bf163d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/class-customify-fonts-global.php
Original file line number Diff line number Diff line change
Expand Up @@ -2175,7 +2175,7 @@ public static function convertFontVariantsToGoogleFontsCSS2Styles( $variants ) {

$axisTuplesList = [];
foreach ( $allWeights as $weight ) {
// Go through all axis determine the tuple (e.g. italic 400 becomes 1,400; or 700 becomes 0,700)
// Go through all axes determine the tuple (e.g. italic 400 becomes 1,400; or 700 becomes 0,700)
// The ital axis can only have the value 0 or 1.
if ( false !== array_search( $weight, $styleWeights['normal'] ) ) {
$axisTuplesList[] = '0,' . $weight;
Expand All @@ -2189,7 +2189,7 @@ public static function convertFontVariantsToGoogleFontsCSS2Styles( $variants ) {
// We must make sure that the axis tags are ordered alphabetically.
sort( $axisTagsList, SORT_STRING );
// We also need to sort the tuples, numerically.
sort( $axisTuplesList, SORT_NUMERIC );
sort( $axisTuplesList, SORT_STRING );

$stylesString = join( ',', $axisTagsList ) . '@' . join( ';', $axisTuplesList );
}
Expand Down

0 comments on commit 0bf163d

Please sign in to comment.