From: vincent@cubedesigners.com Date: Mon, 18 Apr 2011 13:50:41 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6c6437a0a04e2ba0eb82956f061594f8ffd9bb41;p=cubeextranet.git --- diff --git a/inc/ws/Util/packager/class.ws.packager.html5.php b/inc/ws/Util/packager/class.ws.packager.html5.php index d54f3e147..1102205ce 100644 --- a/inc/ws/Util/packager/class.ws.packager.html5.php +++ b/inc/ws/Util/packager/class.ws.packager.html5.php @@ -9,12 +9,16 @@ class wsPackagerHTML5 extends wsPackager { protected $fontsNames = array(); protected $fontsCount = 0; + protected $coef; + protected $div = array(); public function __construct($book_id) { parent::__construct($book_id); $this->version = 'html5'; + + $this->coef = 150 / 72; } protected function preparePackage() @@ -99,7 +103,7 @@ class wsPackagerHTML5 extends wsPackager { protected function writeDiv($div) { - $res = '
'; + $res = '
'; foreach($div['span'] as $span) { $res .= $this->writeSpan($span); } @@ -110,7 +114,7 @@ class wsPackagerHTML5 extends wsPackager { protected function writeSpan($span) { $res = 'coef) . 'px;top:' . ($span['top'] * $this->coef) . 'px" '; $res .= 'class="c' . $span['color'] . ' s' . $span['size'] . ' f' . $span['font'] . '"'; $res .= '>'; $res .= htmlentities($span['text'], ENT_NOQUOTES, 'UTF-8'); @@ -126,7 +130,7 @@ class wsPackagerHTML5 extends wsPackager { } foreach($this->cssSize as $size => $index) { - $size /= 100; + $size = ($size/(20*16))*$this->coef; $res[] = '.s' . $index . '{font-size:' . $size . 'em;}'; }