]> _ Git - cubeextranet.git/commitdiff
fix #3625 @2
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 30 Apr 2020 15:18:42 +0000 (15:18 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 30 Apr 2020 15:18:42 +0000 (15:18 +0000)
inc/ws/Util/html5/master/class.ws.html5.links.php

index 2ece6d62b89321ec36c42fdf18e9fa6e64a42127..3dae0f9bac5fedcd01318538b32aaf9803dc40b0 100644 (file)
@@ -1193,7 +1193,11 @@ class textLink extends contentLink
     public function getCSS()
     {
         $font = $this->compiler->addFont($this->image);
-        $fz = round($this->height * $this->getCssScale() / $font['capHeight'], 2);
+        if (!$font['capHeight']) {
+            $font['capHeight'] = 1;
+        }
+        $fz = $this->height * $this->getCssScale();
+        $fz = round($fz / $font['capHeight'], 2);
         return 'line-height:' . $font['capHeight'] . ';font-size:' . $fz . 'px;font-family:' . $font['family'] . ';color:' . wsHTML5::colorToCSS($this->extra, 1) . ';';
     }