-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
39 lines (33 loc) · 1.3 KB
/
index.php
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
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fontom | PHP library for handling font files</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<h1>Fontom</h1>
<h3>PHP library for handling font files</h3>
<br>
<?php
require_once 'vendor/autoload.php';
use Fontom\Fontom;
// Example usage
try {
//$font = Fontom::load(__DIR__ . "/assets/fonts/Golos Text_Regular.ttf");
//$font = Fontom::load(__DIR__ . "/assets/fonts/CoTextCorp.ttf");
$font = Fontom::load(__DIR__ . "/assets/fonts/Calypso.ttf");
//$font = Fontom::load(__DIR__ . "/assets/fonts/arial.ttf");
//echo "Font Name: " . $font->getFontName() . "\n";
echo "Font Author: " . $font->getFontAuthor() . "\n";
// echo "Available Tables: " . implode(", ", $font->getTables()) . "\n";
} catch (\Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
}
?>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script>
</body>
</html>