From e8593ecf6f971d646dcfc44997ccdc254ece88a8 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 30 Jun 2021 16:00:28 +0000 Subject: [PATCH] wait #4566 @0:10 --- .../twofaces/class.ws.html5.compiler.php | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/inc/ws/Util/html5/twofaces/class.ws.html5.compiler.php b/inc/ws/Util/html5/twofaces/class.ws.html5.compiler.php index a65986f97..393cfe10b 100644 --- a/inc/ws/Util/html5/twofaces/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/twofaces/class.ws.html5.compiler.php @@ -2262,6 +2262,26 @@ height="0" width="0" style="display:none;visibility:hidden"> return $val ? 'true' : 'false'; } + protected function _font($f) + { + $default = 'Arial, Helvetica, sans-serif'; + if($f==='OpenSans') { + $f='Open Sans'; + } + switch ($f) { + case 'Montserrat': + case 'Open Sans': + $this->addFontKit($f); + return "'" . $f . "', " . $default; + case 'sans-serif': + return $f; + case 'Arial': + return $default; + default: + return "'Open Sans', Arial, Helverica, sans-serif"; + } + } + protected function writeCSS($links) { $res = array(); @@ -2270,6 +2290,9 @@ height="0" width="0" style="display:none;visibility:hidden"> $lessContents = ''; + $this->lessVariables['font'] = $this->_font($this->theme->parametres->interfaceFont); + $this->lessVariables['text-transform'] = $this->theme->parametres->interfaceFontUppercase ? 'uppercase' : 'inherit'; + $this->lessVariables['css-scale'] = $this->cssScale; $this->lessVariables['slider-display'] = $this->_lessBoolean($this->theme->parametres->pagesBar); $this->lessVariables['slider-thumb-background'] = wsHTML5::colorToCSS($this->theme->parametres->pageBarThumbBack); -- 2.39.5