diff --git a/app/Http/Controllers/Sales/Invoices.php b/app/Http/Controllers/Sales/Invoices.php
index bde9246d1..0cca29ea6 100644
--- a/app/Http/Controllers/Sales/Invoices.php
+++ b/app/Http/Controllers/Sales/Invoices.php
@@ -288,12 +288,13 @@ class Invoices extends Controller
* @return Response
*/
public function pdfInvoice(Document $invoice)
- {
+ {
event(new \App\Events\Document\DocumentPrinting($invoice));
$currency_style = true;
$view = view($invoice->template_path, compact('invoice', 'currency_style'))->render();
+
$html = mb_convert_encoding($view, 'HTML-ENTITIES', 'UTF-8');
$pdf = app('dompdf.wrapper');
diff --git a/config/dompdf.php b/config/dompdf.php
index 4f14396d2..5d6e55c1c 100644
--- a/config/dompdf.php
+++ b/config/dompdf.php
@@ -78,7 +78,7 @@ return [
/**
* Whether to enable font subsetting or not.
*/
- "enable_font_subsetting" => false,
+ "enable_font_subsetting" => true,
/**
* The PDF rendering backend to use
diff --git a/public/css/fonts/firefly_sung_normal.ttf b/public/css/fonts/firefly_sung_normal.ttf
new file mode 100644
index 000000000..1484f5aee
Binary files /dev/null and b/public/css/fonts/firefly_sung_normal.ttf differ
diff --git a/resources/views/partials/print/head.blade.php b/resources/views/partials/print/head.blade.php
index 9854520ee..65c88ef4e 100644
--- a/resources/views/partials/print/head.blade.php
+++ b/resources/views/partials/print/head.blade.php
@@ -16,11 +16,25 @@
+ @if (isset($currency_style) && $currency_style && in_array(app()->getLocale(), ['zh-CN', 'ja-JP', 'zh-TW']))
+
+ @else
+ @endif
@stack('css')