Lack of kerning when using PHP function imagettftext with the FreeType library
Michael Rafailyk
Posts: 211
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
- 46 Introductions
- 3.9K Typeface Design
- 489 Type Design Critiques
- 568 Type Design Software
- 1.1K Type Design Technique & Theory
- 662 Type Business
- 868 Font Technology
- 29 Punchcutting
- 523 Typography
- 120 Type Education
- 325 Type History
- 78 Type Resources
- 112 Lettering and Calligraphy
- 33 Lettering Critiques
- 79 Lettering Technique & Theory
- 563 Announcements
- 94 Events
- 116 Job Postings
- 170 Type Releases
- 182 Miscellaneous News
- 277 About TypeDrawers
- 55 TypeDrawers Announcements
- 120 Suggestions and Bug Reports