1 | <?php |
||
13 | class WidthCalculator |
||
14 | { |
||
15 | /** |
||
16 | * @var WidthCollection |
||
17 | */ |
||
18 | private $widthCollection; |
||
19 | |||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | private $characterWidths; |
||
24 | |||
25 | /** |
||
26 | * Calculator constructor. |
||
27 | */ |
||
28 | 5 | public function __construct() |
|
32 | |||
33 | /** |
||
34 | * Returns a approximate width of a cell value. |
||
35 | * |
||
36 | * @param mixed $value |
||
37 | * @param bool $isBold |
||
38 | * @return float |
||
39 | */ |
||
40 | 2 | public function getCellWidth($value, $isBold) |
|
53 | |||
54 | /** |
||
55 | * Set proper font sizes by font. |
||
56 | * |
||
57 | * @param Font $font |
||
58 | */ |
||
59 | 2 | public function setFont(Font $font) |
|
63 | } |
||
64 |