Skip Menu |
 

This queue is for tickets about the GD CPAN distribution.

Report information
The Basics
Id: 123193
Status: patched
Priority: 0/
Queue: GD

People
Owner: Nobody in particular
Requestors: andrewg.gray [...] sparq.com.au
Cc:
AdminCc:

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



Subject: truetype font problem workaround.
Date: Thu, 5 Oct 2017 00:45:26 +0000
To: "'bug-GD [...] rt.cpan.org'" <bug-GD [...] rt.cpan.org>
From: "GRAY Andrew G (SPARQ)" <andrewg.gray [...] sparq.com.au>
Download (untitled) / with headers
text/plain 1.6k
When using ttf file in the current directory, you need to prepend with ./ This maybe should not be a bug, but should at least be clear in the documentation. Example, Tahoma font file exists in same dir as perl script. my $ttfFile='tahomabd.ttf'; # doesn't work my $ttfFile='./tahomabd.ttf'; # works ... my @junk = $strImg->stringFT($fgColour,$ttfFile,$height,0,1,$height+1,$string); Regards, Andrew G Gray, Unix Administration, Control Systems/SCADA ************************************************************************************* This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. SPARQ Solutions accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature. Sender Details: SPARQ Solutions PO Box 15760 City East, Brisbane QLD Australia 4002 1800 814 757 SPARQ Solutions policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject. *************************************************************************************
Download (untitled) / with headers
text/plain 814b
On Wed Oct 04 21:01:05 2017, andrewg.gray@sparq.com.au wrote: Show quoted text
> When using ttf file in the current directory, you need to prepend with > ./ > This maybe should not be a bug, but should at least be clear in the > documentation. > > Example, Tahoma font file exists in same dir as perl script. > > my $ttfFile='tahomabd.ttf'; # doesn't work > my $ttfFile='./tahomabd.ttf'; # works > ... > my @junk = $strImg-
> >stringFT($fgColour,$ttfFile,$height,0,1,$height+1,$string);
>
Sure, but the documentation already contains that info: =item $font = B<GD::Font-E<gt>load($fontfilepath)> my $courier = GD::Font->load('./courierR12.fnt') And it's a libgd feature. perl and XS just pass that pathname through. libgd uses font_path() to search env GDFONTPATH if the file is not found. This info should be added.
Download (untitled) / with headers
text/plain 307b
I've added this now to StringFT: The B<fontname> argument is the name of the font, which can be a full pathname to a F<.ttf> file, or if not the paths in C<$ENV{GDFONTPATH}> will be searched or if empty the libgd compiled DEFAULT_FONTPATH. The TrueType extensions .ttf, .pfa, .pfb or .dfont can be omitted.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.