Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Centering Text with GD::Image

by djlerman (Sexton)
on Nov 03, 2021 at 21:37 UTC ( [id://11138407]=note: print w/replies, xml ) Need Help??


in reply to Re: Centering Text with GD::Image
in thread Centering Text with GD::Image

Will this not work with the built in fonts? I am using gdGiantFont.

Replies are listed 'Best First'.
Re^3: Centering Text with GD::Image
by pryrt (Abbot) on Nov 03, 2021 at 21:43 UTC
    According to GD#Font-Utilities, gdGiantFont is a fixed width (monospace) 9x15 font, so unless I'm very much mistaken, it's just 9*nChars to get the width, and the height is a fixed 15 per line of text.

    edit and it's got the width and height methods to tell you those numbers in the code.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11138407]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-07-14 13:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.