1 | <?php |
||
13 | class FontsFactory |
||
14 | { |
||
15 | /** @var string */ |
||
16 | protected $fontsPath; |
||
17 | /** @var array */ |
||
18 | protected $fonts = array(); |
||
19 | |||
20 | 7 | protected function __construct($fontsPath) |
|
25 | |||
26 | 7 | public static function create($fontsPath) |
|
34 | |||
35 | 7 | public function loadFonts() |
|
42 | |||
43 | /** |
||
44 | * @param string $name |
||
45 | * @return Font |
||
46 | * @throws \InvalidArgumentException |
||
47 | */ |
||
48 | 6 | public function getFont($name) |
|
56 | |||
57 | /** |
||
58 | * @param string $name |
||
59 | * @param int $size |
||
60 | * @param string $color |
||
61 | * @return ImagineFont |
||
62 | */ |
||
63 | 6 | public function getImagineFont($name, $size, $color = '#000000') |
|
68 | |||
69 | public function getFonts() |
||
73 | } |
||
74 |