diff --git a/src/FontLib/AdobeFontMetrics.php b/src/FontLib/AdobeFontMetrics.php index a62daaa..a0e973b 100644 --- a/src/FontLib/AdobeFontMetrics.php +++ b/src/FontLib/AdobeFontMetrics.php @@ -139,7 +139,7 @@ function write($file, $encoding = null) { $this->endSection("CharMetrics"); $kern = $font->getData("kern", "subtable"); - $tree = $kern["tree"]; + $tree = is_array($kern) ? $kern["tree"] : null; if (!$encoding && is_array($tree)) { $this->startSection("KernData");