We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cef8caa commit 1b8cda0Copy full SHA for 1b8cda0
src/Exporter.php
@@ -68,13 +68,14 @@ protected function setOptions(array $options)
68
return;
69
}
70
71
- $font = $options['font'];
72
- if (!\is_file($font)) {
73
- $basename = \basename($font, '.ttf');
74
- $font = __DIR__ . "/../font/$basename.ttf";
+ if (\is_file($options['font'])) {
+ $this->font = $options['font'];
+
+ return;
75
76
77
+ $base = \basename($options['font'], '.ttf');
78
+ if (!\is_file($font = __DIR__ . "/../font/$base.ttf")) {
79
throw new \InvalidArgumentException('The given font doesnot exist.');
80
81
0 commit comments