Skip to content

Commit

Permalink
1.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Oct 15, 2022
1 parent 1a62a45 commit ede1492
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
13 changes: 5 additions & 8 deletions Font/Variant.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,14 @@ function preview(Params $params = null) {
* @used-by \Df\GoogleFont\Font\Variant\Preview
* @return string
*/
function ttfPath() {return dfc($this, function() {
/** @var string $result */
if (!file_exists($result = Fs::s()->absolute(['ttf', basename($this->url())]))) {
df_file_write($result, file_get_contents($this->url()));
function ttfPath() {return dfc($this, function() {/** @var string $r */
$u = $this[self::$P__URL]; /** @var string $u */
if (!file_exists($r = Fs::s()->absolute(['ttf', basename($u)]))) {
df_file_write($r, file_get_contents($u));
}
return $result;
return $r;
});}

/** @return string */
private function url() {return $this[self::$P__URL];}

/**
* 2015-11-29
* @param Font $font
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/google-font"
,"version": "1.2.5"
,"version": "1.2.6"
,"description": "Google Font API."
,"type": "magento2-module"
,"homepage": "https://github.com/mage2pro/google-font"
Expand All @@ -11,6 +11,6 @@
"homepage": "https://mage2.pro/users/dmitry_fedyuk",
"role": "Developer"
}]
,"require": {"mage2pro/core": ">=8.1.0", "mage2pro/google": "*"}
,"require": {"mage2pro/core": ">=8.1.1", "mage2pro/google": "*"}
,"autoload": {"files": ["registration.php"], "psr-4": {"Df\\GoogleFont\\": ""}}
}

0 comments on commit ede1492

Please sign in to comment.