Blog entries tagged “postscript”

Tuesday, august 18th, 2009

Updated Freetype2 patch for PHP/GD, 2009-08-18

Posted the patch for php 5.3.0 on the project's page PHP/GD: Better Freetype2.

Also fixed another bug causing segmentation faults when using imagettftext() instead of imagefttext().

Posted at 07:47
Anglais seulement
Tags: fonts · freetype2 · gd · php · postscript
Thursday, may 14th, 2009

Updated Freetype2 patch for PHP/GD

The patch giving more control over Freetype2’s parameters in PHP/GD has been updated!

The nasty bug that made the optional parameter $extrainfo not really optional (omitting it caused no font output) was fixed at last (a minor fix, but laziness is hard to overcome sometimes).

Also released new patches for PHP 5.2.8 and 5.2.9.

See project PHP/GD: Better Freetype2.

Posted at 22:13
Anglais seulement
Tags: fonts · freetype2 · gd · php · postscript
Tuesday, february 5th, 2008

PostScript Metrics & Kerning with PHP/GD

So you want to render a nice PostScript Type 1 font (.pfb/.pfa) using PHP+GD. Sadly, you just realized you can’t load the associated font metrics (.pfm/.afm) in PHP.

The “afm” (ASCII) and “pfm” (Binary) metric files contain, amongst other things, the metrics and the kerning information about the font. To render a font correctly, both the font and the metrics are required.

Freetype2 supports metrics, but you have to load them up “manually”, using the FT_Attach_Stream() or FT_Attach_File() functions. Sadly GD (and PHP) knows nothing about PostScript metric files.

Read the whole post…
Posted at 21:33
Anglais seulement
Tags: fonts · freetype2 · gd · php · postscript