public static function toHTML(array $embed, bool $inlineStyle=false): string
    {
        static $css_done;
        $css = '';

        // use object dimension as dimension reference
        $d = &$embed['dimension'];

        // link to the stylesheet on first run
        if ($inlineStyle && !isset($css_done)) {
            $css = '<style>' . Theme::style() .  '</style>';
            $css_done = true;
        }

        ob_start();
        include __DIR__ . '/Theme/theme.tpl.php';
        $codeblock = ob_get_contents();
        ob_end_clean();
        return preg_replace('/[\t ]*[\r\n]+[\t ]*/', ' ', $css.$codeblock);
    }