Lack of kerning when using PHP function imagettftext with the FreeType library
Michael Rafailyk
Posts: 146
Hi everyone.
I'm testing PHP's imagettftext function to render text as an image on the web. It uses the FreeType library. The problem is that FreeType only supports outdated 'kern' table, as stated in the documentation, and doesn't support a modern 'GPOS' table. So the most fonts are rendered without kerning and without OpenType features, that makes the library not really useful for showcasing fonts.
Perhaps it make a sense to look towards HarfBuzz, just not sure if it is possible install it on leased Apache server. I would appreciate it if someone can share an experience with the other libraries or approaches to render a text as an image on the web.
I'm testing PHP's imagettftext function to render text as an image on the web. It uses the FreeType library. The problem is that FreeType only supports outdated 'kern' table, as stated in the documentation, and doesn't support a modern 'GPOS' table. So the most fonts are rendered without kerning and without OpenType features, that makes the library not really useful for showcasing fonts.
Perhaps it make a sense to look towards HarfBuzz, just not sure if it is possible install it on leased Apache server. I would appreciate it if someone can share an experience with the other libraries or approaches to render a text as an image on the web.
1
Comments
-
Definitely use harfbuzz. I'd look at another host if your current one can't support it.4
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 798 Font Technology
- 1K Technique and Theory
- 617 Type Business
- 444 Type Design Critiques
- 541 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 483 Typography
- 301 History of Typography
- 114 Education
- 68 Resources
- 498 Announcements
- 79 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 269 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports