Skip Menu |

This queue is for tickets about the GDGraph CPAN distribution.

Maintainer(s)' notes

There are plenty of good ideas of what people can do published here on the queue. Turning a patch from the tracker into a pull request is not one of them. In order to get maintainers' attention way more quickier, PR should have at least a sample included. We know it's hard to test images generating software, but it doesn't mean we can not test numbers produced by intermediate algorithms used to generate these images, so either a test or a sample.

Report information
The Basics
Id: 60944
Status: open
Priority: 0/
Queue: GDGraph

People
Owner: Nobody in particular
Requestors: Alfredo.Ospina [...] jacobs.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: true type fonts in windows
Date: Wed, 1 Sep 2010 08:00:13 -0700
To: "bug-GDGraph [...] rt.cpan.org" <bug-GDGraph [...] rt.cpan.org>
From: "Ospina, Alfredo" <Alfredo.Ospina [...] jacobs.com>
GDGraph v1.44 Perl v5.10.1 Windows XP & Windows Server 2008 I can't seem to get true type fonts to work in Windows (ActiveState distribution). Everytime I try to use a true type font, it displays the default font instead. I've tried setting the font path using GD::Text->font_path('C:/windows/fonts') to no avail. Starting to think this is a bug. Not getting any errors, just not displaying font properly. Alfredo Ospina Jacobs Engineering Group 248.633.1489 248.633.1414 fax alfredo.ospina@jacobs.com Show quoted text
________________________________ NOTICE - This communication may contain confidential and privileged information that is for the sole use of the intended recipient. Any viewing, copying or distribution of, or reliance on this message by unintended recipients is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer.
On Wed Sep 01 11:00:28 2010, Alfredo.Ospina@jacobs.com wrote: Show quoted text
> GDGraph v1.44 > Perl v5.10.1 > Windows XP & Windows Server 2008 > > I can't seem to get true type fonts to work in Windows (ActiveState > distribution). Everytime I try to use a true type font, it > displays the default font instead. I've tried setting the font > path using GD::Text->font_path('C:/windows/fonts') to no avail. > Starting to think this is a bug. Not getting any errors, just not > displaying font properly. > > Alfredo Ospina > Jacobs Engineering Group > 248.633.1489 > 248.633.1414 fax > alfredo.ospina@jacobs.com
Hi Alfredo, If Truetype fonts aren't working, that can have several causes, the least likely one being a bug in GD::Graph. Could you try to use a TrueType font directly from GD itself? Something like $gd_object->stringFT($black, 'c:\full\path\to\font\file.ttf', 12, 0, 10, 10, "Test"); should work. An other alternative is to try to test suite that comes with GD, or the GD::Text disctribution, or the test suite that comes with the GD::Graph source distribution. The GD::Graph source distribution uses a test which only uses a truetype font that is packaged with the test. The GD::Text source distribution also has a test only using packaged truetype fonts. If that works, then Truetype is working, but something is wrong with the font path or font path search. GD::Graph uses GD::Text internally, which I think you already know, so any problems with truetype fonts that are my problems would be in that package. Yours is the first report I've had about fonts not working on windows (as far as I know), so I suspect that there is something not entirely right with your installation, or your GD. It is possible that you have a GD that is compiled without TrueType support. Also: You need to use the name of the font file, not the name of the font. Neither GD, nor GD::Text do any parsing of the font files to build a font database, so neither has any knowledge of font metadata, including the name. Regards, Martien -- Stop destroying the world. It's where I keep all my stuff.
Subject: RE: [rt.cpan.org #60944] true type fonts in windows
Date: Thu, 2 Sep 2010 06:41:23 -0700
To: "bug-GDGraph [...] rt.cpan.org" <bug-GDGraph [...] rt.cpan.org>
From: "Ospina, Alfredo" <Alfredo.Ospina [...] jacobs.com>
Martien, I really appreciate your prompt response. I will try some of the items that you have listed to attempt to get it to work. I can tell you that GD-Graph came installed with the Perl 5.10.1 distribution from Active State. I have also tried every combination of font paths I can think of, and have specified the font with the font filename. I will let you know what the results are of further test. Again, thank you for responding. Alfredo Ospina Jacobs Engineering Group 248.633.1489 248.633.1414 fax alfredo.ospina@jacobs.com Show quoted text
-----Original Message----- From: Martien Verbruggen via RT [mailto:bug-GDGraph@rt.cpan.org] Sent: Wednesday, September 01, 2010 6:26 PM To: Ospina, Alfredo Subject: [rt.cpan.org #60944] true type fonts in windows <URL: https://rt.cpan.org/Ticket/Display.html?id=60944 > On Wed Sep 01 11:00:28 2010, Alfredo.Ospina@jacobs.com wrote:
> GDGraph v1.44 > Perl v5.10.1 > Windows XP & Windows Server 2008 > > I can't seem to get true type fonts to work in Windows (ActiveState > distribution). Everytime I try to use a true type font, it > displays the default font instead. I've tried setting the font > path using GD::Text->font_path('C:/windows/fonts') to no avail. > Starting to think this is a bug. Not getting any errors, just not > displaying font properly. > > Alfredo Ospina > Jacobs Engineering Group > 248.633.1489 > 248.633.1414 fax > alfredo.ospina@jacobs.com
Hi Alfredo, If Truetype fonts aren't working, that can have several causes, the least likely one being a bug in GD::Graph. Could you try to use a TrueType font directly from GD itself? Something like $gd_object->stringFT($black, 'c:\full\path\to\font\file.ttf', 12, 0, 10, 10, "Test"); should work. An other alternative is to try to test suite that comes with GD, or the GD::Text disctribution, or the test suite that comes with the GD::Graph source distribution. The GD::Graph source distribution uses a test which only uses a truetype font that is packaged with the test. The GD::Text source distribution also has a test only using packaged truetype fonts. If that works, then Truetype is working, but something is wrong with the font path or font path search. GD::Graph uses GD::Text internally, which I think you already know, so any problems with truetype fonts that are my problems would be in that package. Yours is the first report I've had about fonts not working on windows (as far as I know), so I suspect that there is something not entirely right with your installation, or your GD. It is possible that you have a GD that is compiled without TrueType support. Also: You need to use the name of the font file, not the name of the font. Neither GD, nor GD::Text do any parsing of the font files to build a font database, so neither has any knowledge of font metadata, including the name. Regards, Martien -- Stop destroying the world. It's where I keep all my stuff. NOTICE - This communication may contain confidential and privileged information that is for the sole use of the intended recipient. Any viewing, copying or distribution of, or reliance on this message by unintended recipients is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer.
From: patermanns [...] gmail.com
On Thu Sep 02 09:41:37 2010, Alfredo.Ospina@jacobs.com wrote: Show quoted text
> I really appreciate your prompt response. I will try some of the > items that you have listed to attempt to get it to work. I can > tell you that GD-Graph came installed with the Perl 5.10.1 > distribution from Active State. I have also tried every > combination of font paths I can think of, and have specified the > font with the font filename. I will let you know what the results > are of further test.
I wonder if you have had any success with this. I am using an earlier version of ActiveState Perl (5.8.9) and the following works on Windows (and Red Hat Linux): # ================================== # Font directory my $font_path = ($^O =~ m/^MSWin/)? 'C:\\WINDOWS\\Fonts\\': '/usr/share/fonts/liberation/'; my $font_name = ($^O =~ m/^MSWin/)? 'ARIAL': 'LiberationSans-Regular'; .... $graph->set_title_font("$font_path$font_name.ttf", 12); # ================================== Note the backslashes in the path and that the font size needs to be specified for a Truetype font. Hope this helps!
Subject: New GD::Graph co-maintainer and new release on CPAN
Hello, You recieved this message as you filed a bug report or feature request against GD::Graph module on CPAN. My name is Ruslan and I'm new co-maintainer of the module. I've updated the module to 1.45 with doc changes and released it to CPAN. See distribution status [1]. I have TODO list for several releases, so if your ticket was a patch then turning it into a nice pull request may expedite inclusion :) [1] http://search.cpan.org/~ruz/GDGraph-1.45/Graph.pm#DISTRIBUTION_STATUS -- Best regards, Ruslan.