From 9c997bddae8d4c1155a02ac63687c54ea4a341ad Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Thu, 28 May 2020 10:06:57 +0000 Subject: [PATCH] wip #3634 --- inc/ws/Util/html5/master/class.ws.html5.compiler.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index f6c76b0b8..c18bab25e 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -559,7 +559,7 @@ class wsHTML5Compiler $this->log('Start compile process'); // Raw copy of some directories - $directories = array('style/fonts', 'images', 'sound', 'video'); + $directories = array('style/fonts/OpenSans', 'images', 'sound', 'video'); foreach ($directories as $directory) { $from = $this->assets . '/' . $directory; $this->vdir->copyDirectory($from, $directory); @@ -2373,6 +2373,10 @@ class wsHTML5Compiler return $res; } + public function addFontKit($font){ + $this->vdir->copyDirectory('style/fonts/Montserrat'); + } + public function writeArticles() { $list = []; @@ -2387,6 +2391,10 @@ class wsHTML5Compiler return; } + if($this->book->parametres->articlesFont!=='OpenSans'){ + $this->addFontKit($this->book->parametres->articlesFont); + } + $markupMap = ['category' => 'h3', 'subtitle' => 'h2', 'title' => 'h1', 'lead' => 'div.chapo', 'paragraph' => 'p', 'note' => 'div.note', 'quote' => 'blockquote', 'signature' => 'div.author']; $x = simplexml_load_string(file_get_contents($f)); -- 2.39.5