We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 939d68e + ca8fbf9 commit 17492b0Copy full SHA for 17492b0
1 file changed
src/Html/Font.php
@@ -11,9 +11,12 @@ class Font
11
12
public function toStyle(): string {
13
$list = array();
14
- if($this->name) array_push($list, $this->name ?? ' ');
15
- if($this->family) array_push($list, $this->family ?? ' ');
+ // If the name is in double quotes replace them with single quotes
+ if($this->name) $this->name = preg_replace("/^\"(.*)\"$/", '\'$1\'', $this->name);
16
+ if($this->name) array_push($list, $this->name);
17
+ if($this->family) array_push($list, $this->family);
18
if(sizeof($list) == 0) return "";
- return "font-family:" . join(' ', $list) . ";";
19
+ return "font-family:" . join(', ', $list) . ";";
20
}
21
22
+
0 commit comments