IMAGEFONTWIDTH(3) 1 IMAGEFONTWIDTH(3)imagefontwidth - Get font widthSYNOPSIS
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 horizontallySYNOPSIS
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)