{
public function getCSS()
{
- $font = $this->compiler->addFont($this->image);
- if (!$font['capHeight']) {
- $font['capHeight'] = 1;
- }
- $fz = $this->height * $this->getCssScale();
- $fz = round($fz / $font['capHeight'], 2);
$res = parent::getCSS();
+ $fz = $this->height * $this->getCssScale();
+ $font['capHeight'] = 1;
+ if ($this->image) {
+ $font = $this->compiler->addFont($this->image);
+ if (!$font['capHeight']) {
+ $font['capHeight'] = 1;
+ }
+ $fz = round($fz / $font['capHeight'], 2);
+ } else {
+ $font['family'] = 'Arial, Helvetica, sans-serif';
+ }
$res .= 'line-height:' . $font['capHeight'] . ';font-size:' . $fz . 'px;font-family:' . $font['family'] . ';color:' . Color::colorToCSS($this->extra, 1) . ';';
return $res;
}