I opened this bug report 2 years ago:
https://bugs.php.net/bug.php?id=52756
Is GD still actively maintained?
If it isn't, then perhaps it's time to start thinking about switching to a
graphics library that is maintained?
Perhaps something more modern with real drawing capabilities and a better
typographic engine?
Just wondering...
I briefly asked Pierre about a feature in it recently. By the sounds of it, it is being actively maintained, albeit perhaps slowly.
Sent from my Android phone with K-9 Mail.
Andrew Faulds
http://ajf.me/
Rasmus Schultz rasmus@mindplay.dk wrote:
I opened this bug report 2 years ago:
https://bugs.php.net/bug.php?id=52756
Is GD still actively maintained?
If it isn't, then perhaps it's time to start thinking about switching to a
graphics library that is maintained?
Perhaps something more modern with real drawing capabilities and a better
typographic engine?
Just wondering...
Hi, Rasmus,
Just wanted to note that I've tested your script from
http://fontjazz.com/metrics/test.php and couldn't reproduce the bug.
I'm on the Ubuntu 12.04 with PHP 5.3.10-1ubuntu3.2 with Suhosin-Patch
Have you tried upgrading your FreeType library and recompiling latest
stable PHP with it?
Good luck.
P.S. I'm not a GD developer.
2012/9/6 Rasmus Schultz rasmus@mindplay.dk:
I opened this bug report 2 years ago:
https://bugs.php.net/bug.php?id=52756
Is GD still actively maintained?
If it isn't, then perhaps it's time to start thinking about switching to a
graphics library that is maintained?Perhaps something more modern with real drawing capabilities and a better
typographic engine?Just wondering...
--
Regards,
Shein Alexey
Am Donnerstag, 6. September 2012 um 15:05 schrieb Alexey Shein:
Hi, Rasmus,
Just wanted to note that I've tested your script from
http://fontjazz.com/metrics/test.php and couldn't reproduce the bug.
I'm on the Ubuntu 12.04 with PHP 5.3.10-1ubuntu3.2 with Suhosin-PatchHave you tried upgrading your FreeType library and recompiling latest
stable PHP with it?Good luck.
P.S. I'm not a GD developer.
Hi Alexey,
I just tested it on PHP 5.4.4 on OSX and I can confirm, that the issue is still present.
(used font: Open Sans Regular/Bold/Italic, screenshots: http://min.us/mM2c5yyBU )
Cheers
Jannik Zschiesche
2012/9/6 Jannik Zschiesche hello@apfelbox.net:
Am Donnerstag, 6. September 2012 um 15:05 schrieb Alexey Shein:
Hi, Rasmus,
Just wanted to note that I've tested your script from
http://fontjazz.com/metrics/test.php and couldn't reproduce the bug.
I'm on the Ubuntu 12.04 with PHP 5.3.10-1ubuntu3.2 with Suhosin-PatchHave you tried upgrading your FreeType library and recompiling latest
stable PHP with it?Good luck.
P.S. I'm not a GD developer.
Hi Alexey,
I just tested it on PHP 5.4.4 on OSX and I can confirm, that the issue is
still present.
(used font: Open Sans Regular/Bold/Italic, screenshots:
http://min.us/mM2c5yyBU )
Here is mine with georgiai.ttf
http://minus.com/mbcHodY8D8
--
Regards,
Shein Alexey
The good news is that gd is pretty moribund, there isn't a lot to
maintain. But things do come up.
libgd.org has been displaying the same "oops crap something happened"
notice for... three years? At least? If there is no momentum to fix
that, as the original developer of gd I would be willing to restore
the classic gd documentation there and continue linking to the
bitbucket project.
Am Donnerstag, 6. September 2012 um 15:05 schrieb Alexey Shein:
Hi, Rasmus,
Just wanted to note that I've tested your script from
http://fontjazz.com/metrics/test.php and couldn't reproduce the bug.
I'm on the Ubuntu 12.04 with PHP 5.3.10-1ubuntu3.2 with Suhosin-PatchHave you tried upgrading your FreeType library and recompiling latest
stable PHP with it?Good luck.
P.S. I'm not a GD developer.
Hi Alexey,
I just tested it on PHP 5.4.4 on OSX and I can confirm, that the issue is still present.
(used font: Open Sans Regular/Bold/Italic, screenshots: http://min.us/mM2c5yyBU )Cheers
Jannik Zschiesche
--
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com
libgd.org has been displaying the same "oops crap something happened"
notice for... three years? At least? If there is no momentum to fix
that, as the original developer of gd I would be willing to restore
the classic gd documentation there and continue linking to the
bitbucket project.
Yes, it annoys me that the redirect stopped to work, and yes, for too
long :) The bitbucket page should show up :)
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
Jannik,
Thank you - this confirms I'm not crazy, or at least it's evidence to
support that theory ;-)
It may be OS specific - perhaps the Windows and OSX binaries are built
against a different build (or configuration) of FreeType?
Or it could be specific to 32 or 64 bit builds.
I have never built PHP (or any other C project since 15 years ago in
school) so I really have no way to take this any further...
Thanks!
On Thu, Sep 6, 2012 at 9:15 AM, Jannik Zschiesche hello@apfelbox.netwrote:
Hi Alexey,
I just tested it on PHP 5.4.4 on OSX and I can confirm, that the issue is
still present.
(used font: Open Sans Regular/Bold/Italic, screenshots:
http://min.us/mM2c5yyBU )Cheers
Jannik Zschiesche
Jannik,
Thank you - this confirms I'm not crazy, or at least it's evidence to
support that theory ;-)It may be OS specific - perhaps the Windows and OSX binaries are built
against a different build (or configuration) of FreeType?
It can depend on three things:
- bug in gd (bbox or offset calculation)
- freetype version
- freetype options (some options, not always enabled, strongly affects
rendering)
cheers,
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
Good point - the bug could actually be in the rendering, rather than in the
bounding box calculation.
We could determine which is the case, by running the exact same script with
the exact same font, on a system where the bug is present, and on another
system where it's not.
Then overlay the resulting images in photoshop:
-
if the type aligns, and the red lines do not, the bug is in the bounding
box computation. -
if the type does not align, the bug is either in the type rendering, or
in both (less likely) the rendering and bounding box computation.
That should narrow it down some?
Jannik,
Thank you - this confirms I'm not crazy, or at least it's evidence to
support that theory ;-)It may be OS specific - perhaps the Windows and OSX binaries are built
against a different build (or configuration) of FreeType?It can depend on three things:
- bug in gd (bbox or offset calculation)
- freetype version
- freetype options (some options, not always enabled, strongly affects
rendering)cheers,
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
Rasmus Schultz wrote:
Thank you - this confirms I'm not crazy, or at least it's evidence to
support that theory;-)It may be OS specific - perhaps the Windows and OSX binaries are built
against a different build (or configuration) of FreeType?
Rasmus
Something that is also worth bearing in mind is that even in native
applications, fonts behave a little strange at times. Certainly in windows we
used to have fun between different versions of windows rendering text in
slightly different sizes, and today I have to ask some customers to change fonts
where they have picked up some nice new fancy one, but on Linux it wraps at
different places to Windows or Mac. I certainly remember having to 'adjust' box
sizes on native applications so that the W98 app displayed the same on W2k.
While it would be nice to accurately render a pdf document to a printer, there
is no accurate base to a browser window so we live with things being a little
random when rendered, and often a browser will 'scale' fonts differently when
you zoom them. So personally I just live with the fact that infrastructure is
not as good as perhaps we would like?
It IS some time since I bothered looking at similar problems myself - probably
1990's :) - but I think I'm right in saying that 'italic' is handled in a couple
of different ways? One provides a separate rendering of the italic font, while
the other simply allows the perpendicular font to be rendered at a variable
angle. Looking at the 'faulty' image I would suspect that the metrics are for
the perpendicular case, push the characters back to vertical and they will drop
back in the box. At least if I was going to look at the problem, that is were I
would start ... I doubt that this is purely a PHP bug though?
--
Lester Caine - G8HFL
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
hi Lester,
Rasmus Schultz wrote:
Thank you - this confirms I'm not crazy, or at least it's evidence to
support that theory;-)It may be OS specific - perhaps the Windows and OSX binaries are built
against a different build (or configuration) of FreeType?Rasmus
Something that is also worth bearing in mind is that even in native
applications, fonts behave a little strange at times. Certainly in windows
we used to have fun between different versions of windows rendering text in
slightly different sizes, and today I have to ask some customers to change
fonts where they have picked up some nice new fancy one, but on Linux it
wraps at different places to Windows or Mac. I certainly remember having to
'adjust' box sizes on native applications so that the W98 app displayed the
same on W2k.
As this is true, it is unrelated to GD. GD uses Freetype on all
supported platforms.
While it would be nice to accurately render a pdf document to a printer,
there is no accurate base to a browser window so we live with things being a
little random when rendered, and often a browser will 'scale' fonts
differently when you zoom them. So personally I just live with the fact that
infrastructure is not as good as perhaps we would like?
Unrelated, PDF texts are vectors, GD renders on bitmap directly.
I doubt that this is purely a PHP bug though?
Please see my other reply for the actual possible causes.
Cheers,
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
hi Rasmus,
I opened this bug report 2 years ago:
https://bugs.php.net/bug.php?id=52756
Is GD still actively maintained?
yes. Slowly but yes, we will finally merge 2.1 in 5.5 too.
Perhaps something more modern with real drawing capabilities and a better
typographic engine?
there is gd/pango available too, it allows to replace freetype
functions transparently. Pango is much better for rendering. Not sure
if the bug you refer to is a freetype bug or something else tho'.
Cheers,
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
Pierre Joye in php.internals (Thu, 6 Sep 2012 18:43:01 +0200):
I opened this bug report 2 years ago:
https://bugs.php.net/bug.php?id=52756
Hmmm. I see it is still open.
Is GD still actively maintained?
yes. Slowly but yes, we will finally merge 2.1 in 5.5 too.
Related, but no real bug: libjpeg 9.0 is released. It compiles fine into
php_gd2.dll, but reports an unknown version. This is due to
ext/gd/libgd/gd_jpeg.c, which only knows versions 6b, 7 and 8. A simple
check for JPEG_LIB_VERSION == 90 would be enough for the moment, but
wouldn't it be better to report the JPEG_LIB_VERSION it self? 62, 70,
80, 90 or whatever...
Jan