]> _ Git - cubeextranet.git/commitdiff
wip #3634
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 28 May 2020 10:06:57 +0000 (10:06 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 28 May 2020 10:06:57 +0000 (10:06 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index f6c76b0b8a6fbbf6455672beec3b2b0c95603eb1..c18bab25e8763d5770fdc31d3b675e869d626806 100644 (file)
@@ -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));