-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathFontProcessorInterface.php
More file actions
41 lines (32 loc) Β· 1.09 KB
/
FontProcessorInterface.php
File metadata and controls
41 lines (32 loc) Β· 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
declare(strict_types=1);
namespace Intervention\Image\Interfaces;
use Intervention\Image\Typography\TextBlock;
interface FontProcessorInterface
{
/**
* Calculate size of bounding box of given text in conjunction with the given font.
*/
public function boxSize(string $text, FontInterface $font): SizeInterface;
/**
* Build TextBlock object from text string and align every line according
* to text modifier's font object and position.
*/
public function textBlock(string $text, FontInterface $font, PointInterface $position): TextBlock;
/**
* Calculate the actual font size to pass at the driver level.
*/
public function nativeFontSize(FontInterface $font): float;
/**
* Calculate the typographical font size in pixels.
*/
public function typographicalSize(FontInterface $font): int;
/**
* Calculates typographical cap height.
*/
public function capHeight(FontInterface $font): int;
/**
* Calculates typographical leading size.
*/
public function leading(FontInterface $font): int;
}