HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/web/roundcube/vendor/roundcube/rtf-html-php/src/Html/Font.php
<?php

namespace RtfHtmlPhp\Html;

class Font
{
    public $family;
    public $fprq;
    public $name;
    public $charset;
    public $codepage;

    /**
     * Returns font style (font-family) string
     *
     * @return string A string including font-family: prefix. An empty string if font is not set
     */
    public function toStyle()
    {
        $list = [];

        if ($this->name) {
            $list[] = $this->name;
        }

        if ($this->family) {
            $list[] = $this->family;
        }

        if (count($list) == 0) {
            return '';
        }

        return "font-family:" . implode(',', $list);
    }
}