From: vincent@cubedesigners.com Date: Mon, 15 Aug 2011 03:57:16 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=866cda1e951227c2bc122047bf78de8ee6494d6c;p=cubeextranet.git --- diff --git a/inc/ws/Util/packager/html5/class.ws.packager.html5.php b/inc/ws/Util/packager/html5/class.ws.packager.html5.php index bd1c2b22a..a396a9ad5 100644 --- a/inc/ws/Util/packager/html5/class.ws.packager.html5.php +++ b/inc/ws/Util/packager/html5/class.ws.packager.html5.php @@ -130,7 +130,7 @@ class wsPackagerHTML5 extends wsPackager { } $style = array(); foreach ($sheets as $sheet) { - $style[] = ''; + $style[] = ''; } $style = implode("\n\t\t", $style); @@ -251,25 +251,18 @@ class wsPackagerHTML5 extends wsPackager { } protected function writeFonts() { - $formats = array('ttf', 'woff', 'svg', 'svgz', 'eot'); + $formats = array('ttf', 'woff', 'svg'); foreach ($this->cssFont as $font => $index) { foreach ($formats as $format) { - if ($format == 'eot') { - $ttf2eot = new cubeCommandLine('ttf2eot', $this->vdir . '/data/style/F' . $index . '.' . $format); - $ttf2eot->setPath(CONVERTER_PATH); - $ttf2eot->setManualArg('< ' . $this->vdir . '/data/style/F' . $index . '.ttf'); - $ttf2eot->execute(); - } else { - $fontforge = new cubeCommandLine('convert.pe'); - $fontforge->setPath(CONVERTER_PATH); - foreach ($this->fontDocs[$font] as $document_id => $dummy) { - $fontforge->setArg(null, WS_DOCS . '/' . $document_id . '/fonts/web/' . $font . '.ttf'); - } - $fontforge->setArg(null, $this->vdir . '/data/style/F' . $index . '.' . $format); - $fontforge->execute(); + $fontforge = new cubeCommandLine('convert.pe'); + $fontforge->setPath(CONVERTER_PATH); + foreach ($this->fontDocs[$font] as $document_id => $dummy) { + $fontforge->setArg(null, WS_DOCS . '/' . $document_id . '/fonts/web/' . $font . '.ttf'); } + $fontforge->setArg(null, $this->vdir . '/data/style/F' . $index . '.' . $format); + $fontforge->execute(); } } } @@ -407,6 +400,13 @@ class wsPackagerHTML5 extends wsPackager { $res[] = '.doublePage,#pages,.landscape #shadow.double{width:' . $w2 . ';max-width:' . $w2 . ';height:' . $h . ';max-height:' . $h . '}'; $res[] = '.landscape #shadow.single.right{left: ' . $w . ';}'; $res[] = '.landscape .page.right{left:' . $w . '}'; + if ($this->theme->parametres->displayPageNumber) { + $res[] = '#pagesnumbers{top:' . $h . ';color:' . self::colorToCSS($this->theme->parametres->colorPageNumber) . '}'; + $res[] = '#pagesnumbers div{width:' . $w . '}'; + } else { + $res[] = '#pagesnumbers{display:none;}'; + } + $texts = '.texts{' . $this->writeCSSUA('transform-origin', 'top left') . ';'; $texts.=$this->writeCSSUA('transform', 'scale(' . round(1 / $this->multiply, 2) . ')') . ';'; $texts.='width:' . $wm . '; max-width:' . $wm . ';'; @@ -563,7 +563,7 @@ class wsPackagerHTML5 extends wsPackager { } foreach ($this->cssFont as $font => $index) { - $res[] = "@font-face{font-family:F" . $index . ";src:url('F" . $index . ".eot');src:url('F" . $index . ".eot?#iefix') format('eot'),url('F" . $index . ".ttf') format('truetype'),url('F" . $index . ".svgz#" . $font . "') format('svgz'),url('F" . $index . ".svg#" . $font . "') format('svg')}"; + $res[] = "@font-face{font-family:F" . $index . ";src:url('F" . $index . ".woff') format('woff'),url('F" . $index . ".ttf') format('truetype'),url('F" . $index . ".svg#" . $font . "') format('svg')}"; $res[] = '.f' . $index . '{font-family:F' . $index . ',Arial,Helvetica}'; } @@ -750,7 +750,7 @@ class wsPackagerHTML5 extends wsPackager { protected function getCSSLetterSpacing($letterspacing) { - $letterspacing = $this->normalizeFloatValue($letterspacing, 5); + $letterspacing = $this->normalizeFloatValue($letterspacing, 4); if ($letterspacing == 0) { return null; @@ -759,7 +759,7 @@ class wsPackagerHTML5 extends wsPackager { } protected function getCSSWordSpacing($wordspacing) { - $wordspacing = $this->normalizeFloatValue($wordspacing, 5); + $wordspacing = $this->normalizeFloatValue($wordspacing, 4); if ($wordspacing == 0) { return null;