]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6232 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 31 Aug 2023 12:30:36 +0000 (14:30 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 31 Aug 2023 12:30:36 +0000 (14:30 +0200)
app/Fluidbook/Compiler/Compiler.php

index 46babf640126da34227a32825415964eee5802fb..f57b88251ca7e4c7a54df1a76e0ee6676c49d2de 100644 (file)
@@ -2315,7 +2315,7 @@ class Compiler extends Base implements CompilerInterface
                 }
             }
             $capHeight = 1;
-            if (isset($fontCapHeight) && isset($fontHeight)) {
+            if (isset($fontCapHeight) && isset($fontHeight) && is_numeric($fontCapHeight) && is_numeric($fontHeight)) {
                 $capHeight = $fontCapHeight / $fontHeight;
             }
             $font = ['family' => $hash, 'capHeight' => $capHeight, 'ascender' => $ascender / $fontHeight, 'descender' => $descender / $fontHeight];