mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix secondary fonts for Invoice Design preview
If a secondary font is used in the Invoice Design settings, it works in the Custom Design editor, but the preview in General Settings always shows Roboto in place of the secondary font, regardless of settings. This updates PdfMock to also support secondary fonts on the main tab.
This commit is contained in:
parent
3b5bf28aad
commit
9bad0873e9
@ -154,7 +154,7 @@ class PdfMock
|
|||||||
$entity->tax_map = $this->getTaxMap();
|
$entity->tax_map = $this->getTaxMap();
|
||||||
$entity->total_tax_map = $this->getTotalTaxMap();
|
$entity->total_tax_map = $this->getTotalTaxMap();
|
||||||
$entity->invitation->company = $this->company;
|
$entity->invitation->company = $this->company;
|
||||||
|
|
||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,6 +242,7 @@ class PdfMock
|
|||||||
'$company.postal_code' => $this->settings->postal_code,
|
'$company.postal_code' => $this->settings->postal_code,
|
||||||
'$client.billing_city' => 'Aufderharchester',
|
'$client.billing_city' => 'Aufderharchester',
|
||||||
'$secondary_font_name' => isset($this->settings?->secondary_font) ? $this->settings->secondary_font : 'Roboto',
|
'$secondary_font_name' => isset($this->settings?->secondary_font) ? $this->settings->secondary_font : 'Roboto',
|
||||||
|
'$secondary_font_url' => isset($this->settings?->secondary_font) ? \App\Utils\Helpers::resolveFont($this->settings->secondary_font)['url'] : 'https://fonts.googleapis.com/css2?family=Roboto&display=swap',
|
||||||
'$product.line_total' => '',
|
'$product.line_total' => '',
|
||||||
'$product.tax_amount' => '',
|
'$product.tax_amount' => '',
|
||||||
'$company.vat_number' => $this->settings->vat_number,
|
'$company.vat_number' => $this->settings->vat_number,
|
||||||
@ -249,7 +250,6 @@ class PdfMock
|
|||||||
'$quote.quote_number' => '0029',
|
'$quote.quote_number' => '0029',
|
||||||
'$client.postal_code' => '11243',
|
'$client.postal_code' => '11243',
|
||||||
'$contact.first_name' => 'Benedict',
|
'$contact.first_name' => 'Benedict',
|
||||||
'$secondary_font_url' => 'https://fonts.googleapis.com/css2?family=Roboto&display=swap',
|
|
||||||
'$contact.signature' => '',
|
'$contact.signature' => '',
|
||||||
'$company_logo_size' => $this->settings->company_logo_size ?: '65%',
|
'$company_logo_size' => $this->settings->company_logo_size ?: '65%',
|
||||||
'$product.tax_rate1' => ctrans('texts.tax'),
|
'$product.tax_rate1' => ctrans('texts.tax'),
|
||||||
@ -994,7 +994,7 @@ class PdfMock
|
|||||||
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" valign="top">
|
<td align="center" valign="top">
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
||||||
<tbody><tr>
|
<tbody><tr>
|
||||||
<td align="center" class="new_button" style="border-radius: 2px; background-color: #298AAB">
|
<td align="center" class="new_button" style="border-radius: 2px; background-color: #298AAB">
|
||||||
@ -1028,7 +1028,7 @@ class PdfMock
|
|||||||
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" valign="top">
|
<td align="center" valign="top">
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
||||||
<tbody><tr>
|
<tbody><tr>
|
||||||
<td align="center" class="new_button" style="border-radius: 2px; background-color: #298AAB">
|
<td align="center" class="new_button" style="border-radius: 2px; background-color: #298AAB">
|
||||||
@ -1059,7 +1059,7 @@ class PdfMock
|
|||||||
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" valign="top">
|
<td align="center" valign="top">
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
||||||
<tbody><tr>
|
<tbody><tr>
|
||||||
<td align="center" class="new_button" style="border-radius: 2px; background-color: #298AAB">
|
<td align="center" class="new_button" style="border-radius: 2px; background-color: #298AAB">
|
||||||
@ -1094,7 +1094,7 @@ class PdfMock
|
|||||||
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
<table align="center" cellspacing="0" cellpadding="0" style="width: 600px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" valign="top">
|
<td align="center" valign="top">
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
|
||||||
<tbody><tr>
|
<tbody><tr>
|
||||||
<td align="center" class="new_button" style="border-radius: 2px; background-color: #298AAB">
|
<td align="center" class="new_button" style="border-radius: 2px; background-color: #298AAB">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user