Skip to content

Commit

Permalink
Comments updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Tymotey committed Jul 17, 2024
1 parent 2bd5a53 commit 55cd125
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/optimize.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -596,21 +596,24 @@ private function convert_to_api_v1($qs){
$add_values_array = [];
$add_data .= ':';

// Has italic only.
if($options[1] == 'ital'){
foreach( [100,200,300,400,500,600,700,800,900] as $weight ){
$add_values_array[] = $weight;
$add_values_array[] = $weight.'italic';
}
}
else{
// Font_modifier and Font_modifier_values.
$options = explode('@', $options[1]);

// Font modifiers and values
$font_modifier = explode(',', $options[0]);
$font_modifier_values = explode(';', $options[1]);

// Modify values to css1.
// Go through each values.
foreach($font_modifier_values as $k => &$modifier_value){
// Get array of values for each combination.
$modifier_value_array = explode(',', $modifier_value);

// Italic key.
Expand Down Expand Up @@ -686,7 +689,7 @@ private function _async_ggfonts()
*
* Could be multiple fonts
*
* CSS API V1
* CSS API V1
* <link rel='stylesheet' href='//fonts.googleapis.com/css?family=Open+Sans%3A400%2C600%2C700%2C800%2C300&#038;ver=4.9.8' type='text/css' media='all' />
* <link rel='stylesheet' href='//fonts.googleapis.com/css?family=PT+Sans%3A400%2C700%7CPT+Sans+Narrow%3A400%7CMontserrat%3A600&#038;subset=latin&#038;ver=4.9.8' type='text/css' media='all' />
* -> family: PT Sans:400,700|PT Sans Narrow:400|Montserrat:600
Expand Down

0 comments on commit 55cd125

Please sign in to comment.