You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7bec5bd
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+37-3Lines changed: 37 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,38 @@ How to migrate custom font usage:
99
99
3. Keep using `SetFont()`/`AddFont()` from TCPDF, but validate that each custom family resolves from tc-lib assets or from your explicit font path.
100
100
4. Update deployment packaging so `vendor/` font assets are shipped in production.
101
101
102
-
Font generation procedure (Makefile):
102
+
Font generation procedure:
103
+
104
+
Font assets are generated at install time and are not shipped in the package. Composer runs the scripts declared by the root project only, so a project that requires TCPDF as a dependency must run the generation itself.
105
+
106
+
In a project that requires TCPDF, add the step to its own `composer.json`:
This covers `composer install`, `composer update`, `composer require` and `composer dump-autoload`. To generate them once instead, run the build from the project root:
128
+
129
+
```bash
130
+
make -C vendor/tecnickcom/tc-lib-pdf-font deps fonts
131
+
```
132
+
133
+
In a checkout of this repository, use the Makefile targets:
103
134
104
135
1. Run `make deps` to install Composer dependencies and initialize tc-lib font assets.
105
136
2. Run `make fonts` to initialize fonts only when missing.
A missing asset directory is reported as `unable to read file: helvetica.json` on the first page. The full font documentation is at [tcpdf.org/docs/fonts](https://tcpdf.org/docs/fonts/).
144
+
112
145
Compatibility notes:
113
146
114
147
- TCPDF checks configured font paths and tc-lib font assets.
@@ -122,8 +155,9 @@ Example:
122
155
```php
123
156
require __DIR__.'/vendor/autoload.php';
124
157
125
-
// Optional: override only if you need a non-default path.
0 commit comments