Import Ruty

This commit is contained in:
2024-03-11 00:57:00 +01:00
parent 50481b23df
commit 34a31bb184
617 changed files with 106612 additions and 0 deletions
@@ -0,0 +1,35 @@
<?php
namespace RtfHtmlPhp\Html;
class Font
{
public $family;
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);
}
}