Skip to content

Commit 3f14d64

Browse files
committed
Improve the README
1 parent 24f9319 commit 3f14d64

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Usage Example
1414
-------------
1515

1616
### Base font information
17-
```
17+
18+
```php
1819
$font = \FontLib\Font::load('fontfile.ttf');
1920
$font->parse(); // for getFontWeight() to work this call must be done first!
2021
echo $font->getFontName() .'<br>';
@@ -28,14 +29,16 @@ $font->close();
2829
```
2930

3031
### Font Metrics Generation
31-
```
32+
33+
```php
3234
$font = FontLib\Font::load('fontfile.ttf');
3335
$font->parse();
3436
$font->saveAdobeFontMetrics('fontfile.ufm');
3537
```
3638

3739
### Create a font subset
38-
```
40+
41+
```php
3942
$font = FontLib\Font::load('fontfile.ttf');
4043
$font->parse();
4144
$font->setSubset("abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ.:,;' (!?)+-*/== 1234567890"); // characters to include

0 commit comments

Comments
 (0)