Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

imagefontwidth(3) [php man page]

IMAGEFONTWIDTH(3)							 1							 IMAGEFONTWIDTH(3)

imagefontwidth - Get font width

SYNOPSIS
int imagefontwidth (int $font) DESCRIPTION
Returns the pixel width of a character in font. PARAMETERS
o $ font -Can be 1, 2, 3, 4, 5 for built-in fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or any of your own font identifiers registered with imageloadfont(3). RETURN VALUES
Returns the pixel width of the font. EXAMPLES
Example #1 Using imagefontwidth(3) on built-in fonts <?php echo 'Font width: ' . imagefontwidth(4); ?> The above example will output something similar to: Font width: 8 Example #2 Using imagefontwidth(3) together with imageloadfont(3) <?php // Load a .gdf font $font = imageloadfont('anonymous.gdf'); echo 'Font width: ' . imagefontwidth($font); ?> The above example will output something similar to: Font width: 23 SEE ALSO
imagefontheight(3), imageloadfont(3). PHP Documentation Group IMAGEFONTWIDTH(3)

Check Out this Related Man Page

IMAGECHAR(3)								 1							      IMAGECHAR(3)

imagechar - Draw a character horizontally

SYNOPSIS
bool imagechar (resource $image, int $font, int $x, int $y, string $c, int $color) DESCRIPTION
imagechar(3) draws the first character of $c in the image identified by $image with its upper-left at $x,$y (top left is 0, 0) with the color $color. PARAMETERS
o $ image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3). o $ font -Can be 1, 2, 3, 4, 5 for built-in fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or any of your own font identifiers registered with imageloadfont(3). o $x - x-coordinate of the start. o $y - y-coordinate of the start. o $c - The character to draw. o $color - A color identifier created with imagecolorallocate(3). RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 imagechar(3) example <?php $im = imagecreate(100, 100); $string = 'PHP'; $bg = imagecolorallocate($im, 255, 255, 255); $black = imagecolorallocate($im, 0, 0, 0); // prints a black "P" in the top left corner imagechar($im, 1, 0, 0, $string, $black); header('Content-type: image/png'); imagepng($im); ?> The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example : imagechar() SEE ALSO
imagecharup(3), imageloadfont(3). PHP Documentation Group IMAGECHAR(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Solaris 8 Font Path ...

Hello, I feel a little initimidated to ask this question, but ... where am I able to find the font path (Solaris 8)? Bye Sysadv (1 Reply)
Discussion started by: sysadv
1 Replies

2. UNIX for Dummies Questions & Answers

email file to Outlook using fixed font

I have a unix script that emails output from a sql script. Problem is that the email, once received in Outlook, is in a variable width font which misaligns the columns (I assume it picks up the users default font). Is there any way to send the desired fixed-width font to Outlook via mailx or elm?... (1 Reply)
Discussion started by: tonimac_az
1 Replies

3. UNIX for Dummies Questions & Answers

How to force the print Font?

Hi, Now I am printing my ps file as follows: lp -d n40prt0234 $i where $i is the file name passed in a loop. I need to change the file's print fonts to "Verdana and the Size = 10" how to change? (2 Replies)
Discussion started by: redlotus72
2 Replies

4. AIX

Modify Print Orientation, Font and Pitch

I need to be able to change the font, pitch, and orientation when printing a text flat file. Any suggestions appreciated. (2 Replies)
Discussion started by: mad_dog
2 Replies

5. UNIX for Dummies Questions & Answers

Font Size when printing too big....

Hello, Can some please tell me how to change the font size when I print a document from SCO Unixware 7.1? :confused: The fonts are showing up too big when printing and part of the text is cut off on the edges of the documet... Any help is appreciated. Thanks (6 Replies)
Discussion started by: George26
6 Replies

6. UNIX for Dummies Questions & Answers

Font size in VIM

Hello, I use VIM version 7.1.56 on Ubuntu OS. Can you tell me pls how can I change the font-size in VIM? Thanks, Iuli (1 Reply)
Discussion started by: ketchera
1 Replies

7. Shell Programming and Scripting

how to make a line BLINKING in output and also how to increase font size in output

how to make a line BLINKING in output and also how to increase font size in output suppose in run a.sh script inside echo "hello world " i want that this should blink in the output and also the font size of hello world should be big .. could you please help me out in this (3 Replies)
Discussion started by: mail2sant
3 Replies

8. Solaris

Saving Font Settings

I've written some tools that don't like the default font setting that come up with the Common Desktop Environment. (The text on the buttons looks like the dingbat character set.) The work around is to go into the style manager and set the font to anything other than 'medium' which is the default.... (2 Replies)
Discussion started by: scottwevans
2 Replies

9. Shell Programming and Scripting

Font Size

Hi All, Please can someone advise on how to change the font size of the output of a shell script. Best Regards, Shazin (2 Replies)
Discussion started by: Shazin
2 Replies

10. Solaris

Solaris Default Font

I am using Solaris 10 x86 with CDE (I love CDE). I am curious, what is the font used for the window titles? I know it's dt-* but that's an alias to the actual font name. I had it written down a couple of years ago and lost it in a move. (2 Replies)
Discussion started by: woomia
2 Replies

11. Shell Programming and Scripting

Font Size in shell!

hi all,, is it possible to change the font size of the first line of text? i search it to internet but i have no luk. Ex. Line 1: HI Line 2: back to normal font size. THanks, (4 Replies)
Discussion started by: nikki1200
4 Replies

12. UNIX for Dummies Questions & Answers

Increase Font size for text to type in CYGWIN

Please mention "How to increase font size for text to type commands in CYGWIN " ? (2 Replies)
Discussion started by: adirajup
2 Replies

13. What is on Your Mind?

New Icons Coming from Font Awesome

Finally making some progress on getting rid of the 10 year old buttons with modern day fonts and icons thanks to a responsive web design tutorial by Brad Traversy who's video pointed me to Font Awesome. The buttons and icons were pretty easy to implement but it too me a number of hours... (39 Replies)
Discussion started by: Neo
39 Replies

14. What is on Your Mind?

New Mobile Navbar Icons from Font Awesome

Just changed the mobile site to use Font Awesome icons. Here is the new top navbar view (unregistered users) https://www.unix.com/members/1-albums214-picture903.jpeg (2 Replies)
Discussion started by: Neo
2 Replies

15. What is on Your Mind?

Quick Update on UNIX.COM Site Renovation: Bootstrap, Font Awesome and jQuery

Here is an update on the site renovation: After a lot of analysis and example programming, including testing out a number of Javascript framework and libraries, in the short term, we are getting the most bang-for-the-buck from these three basic, core tech areas: Bootstrap (CSS and... (2 Replies)
Discussion started by: Neo
2 Replies