File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,18 @@ This library can be used to:
12
12
You can find a demo GUI [ here] ( http://pxd.me/php-font-lib/www/font_explorer.html ) .
13
13
14
14
This project was initiated by the need to read font files in the [ DOMPDF project] ( https://github.com/dompdf/dompdf ) .
15
+
16
+ Usage Example
17
+ -------------
18
+
19
+ ```
20
+ $font = \FontLib\Font::load('../../fontfile.ttf');
21
+ $font->parse(); // for getFontWeight() to work this call must be done first!
22
+ echo $font->getFontName() .'<br>';
23
+ echo $font->getFontSubfamily() .'<br>';
24
+ echo $font->getFontSubfamilyID() .'<br>';
25
+ echo $font->getFontFullName() .'<br>';
26
+ echo $font->getFontVersion() .'<br>';
27
+ echo $font->getFontWeight() .'<br>';
28
+ echo $font->getFontPostscriptName() .'<br>';
29
+ ```
You can’t perform that action at this time.
0 commit comments