public function toString()
{
if ($this->_flags === 0) {
return '';
}
$str = '';
if ($this->_flags & self::IS_SET_BOLD) {
$str .= 'font-weight:' . ($this->_flags & self::IS_BOLD ? 'bold;' : 'normal;');
}
if ($this->_flags & self::IS_SET_ITALIC) {
$str .= 'font-style:' . ($this->_flags & self::IS_ITALIC ? 'italic;' : 'normal;');
}
$textDec = '';
if ($this->_flags & self::IS_UNDERLINE) {
$textDec .= 'underline';
}
if ($this->_flags & self::IS_OVERLINE) {
$textDec .= ' overline';
}
if ($this->_flags & self::IS_STRIKEOUT) {
$textDec .= ' line-through';
}
$textDec = ltrim($textDec);
if ($textDec !== '') {
$str .= 'text-decoration:' . $textDec . ';';
}
if ($this->_size !== '') {
$str .= 'font-size:' . $this->_size . ';';
}
if ($this->_name !== '') {
$str .= 'font-family:' . $this->_name . ';';
}
return $str;
}