mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Use font from the settings
This commit is contained in:
parent
f4979fb0a4
commit
8552431678
@ -274,7 +274,7 @@ class Helpers
|
||||
public static function resolveFont(string $font = 'Arial'): array
|
||||
{
|
||||
return $font
|
||||
? ['name' => $font, 'url' => sprintf('https://fonts.googleapis.com/css2?family=%s&display=swap', $font)]
|
||||
? ['name' => str_replace('_', ' ', $font), 'url' => sprintf('https://fonts.googleapis.com/css2?family=%s&display=swap', str_replace('_', '+', $font))]
|
||||
: ['name' => 'Arial', 'url' => ''];
|
||||
}
|
||||
}
|
||||
|
@ -445,8 +445,8 @@ class HtmlEngine
|
||||
$data['_rate3'] = ['value' => '', 'label' => ctrans('texts.tax')];
|
||||
|
||||
$data['$font_size'] = ['value' => $this->settings->font_size . 'px', 'label' => ''];
|
||||
$data['$font_name'] = ['value' => Helpers::resolveFont()['name'], 'label' => ''];
|
||||
$data['$font_url'] = ['value' => Helpers::resolveFont()['url'], 'label' => ''];
|
||||
$data['$font_name'] = ['value' => Helpers::resolveFont($this->settings->primary_font)['name'], 'label' => ''];
|
||||
$data['$font_url'] = ['value' => Helpers::resolveFont($this->settings->primary_font)['url'], 'label' => ''];
|
||||
|
||||
$data['$invoiceninja.whitelabel'] = ['value' => 'https://raw.githubusercontent.com/invoiceninja/invoiceninja/v5-develop/public/images/new_logo.png', 'label' => ''];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user