By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,563 Members | 1,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,563 IT Pros & Developers. It's quick & easy.

imageloadfont

P: n/a
ozi
Hi!

Does enybody know how to make file
with verdana 10 font for imageloadfont() function?

I found few working fonts on:
http://www.30mb.com/x/dryes/fonts/fonts.html

ozi

Jul 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
ozi <oz*@post.pl> wrote:
Hi! Does enybody know how to make file
with verdana 10 font for imageloadfont() function?


I assume you mean a TrueType font called verdana?

imageloadfont() is for bitmap fonts; you want likely want to use
imagettftext():

http://www.php.net/manual/en/function.imagettftext.php

--
niall
Jul 17 '05 #2

P: n/a
ozi
> I assume you mean a TrueType font called verdana?

Yes :)
imageloadfont() is for bitmap fonts;
And i want to create verdana 10 bitmap font or convert
verdana from ttf to bitmap to use it with
imagestringup() function.
I need to write vertical text.
you want likely want to use
imagettftext():

http://www.php.net/manual/en/function.imagettftext.php


imagettftext() example:
http://217.153.145.170/~ozi/image/vertical_text.php
Can You see the difference?

ozi
Jul 17 '05 #3

P: n/a
"ozi" <oz*@post.pl> wrote in message news:<c8**********@atlantis.news.tpi.pl>...
<snip>
imagettftext() example:
http://217.153.145.170/~ozi/image/vertical_text.php
Can You see the difference?


Do you mean this (user note)? <http://in.php.net/imagettftext#27685>

--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com
Jul 17 '05 #4

P: n/a
ozi <oz*@post.pl> wrote:
I assume you mean a TrueType font called verdana?
Yes :) imageloadfont() is for bitmap fonts; And i want to create verdana 10 bitmap font or convert
verdana from ttf to bitmap to use it with
imagestringup() function.
Converting a font is not possible in PHP, and so offtopic.
I need to write vertical text.
Use the "angle" parameter for imagettftext() to specify what direction
to write the text.
you want likely want to use
imagettftext():

http://www.php.net/manual/en/function.imagettftext.php

imagettftext() example:
http://217.153.145.170/~ozi/image/vertical_text.php
Can You see the difference?


I only see an error message. ;( Could you post your code?

--
niall

Jul 17 '05 #5

P: n/a
ozi
> Converting a font is not possible in PHP, and so offtopic.

I don't want to convert font in PHP.
I wanto to create this font under linux or windows to use if with
imageloadfont().
I just can't find the tool to do this :(
I need to write vertical text.
Use the "angle" parameter for imagettftext() to specify what direction
to write the text.
I know that :)
I only see an error message. ;( Could you post your code?


Hmmmm, it works on my computer.

header("content-type:image/png");
$Image=ImageCreate(400,30);
$black=ImageColorAllocate($Image,0,0,0);
$white=ImageColorAllocate($Image,255,255,255);
imagefill($Image, 0, 0, $white);
ImageTTFText($Image, 10, 0, 10, 20, $black,
"/home/ozi/public_html/image/verdana.ttf","This is verdana 10");
ImagePNG($Image, "/home/ozi/public_html/image/im.png");
ImageDestroy($Image);
echo '<img src="im.png" border="0"><br />';
echo 'This is verdana 10 from css file (body { font: normal 10px
Verdana; })!';

Screenshot:
http://reglowa.ktr.pl/~ozi/image/example.html

ozi
Jul 17 '05 #6

P: n/a
ozi
> Do you mean this (user note)? <http://in.php.net/imagettftext#27685>

Interesting but i changed my code to:
$r = (10/96)*72;
ImageTTFText($Image, $r, 0, 10, 20, $black,
"/home/ozi/public_html/image/verdana.ttf","This is verdana 10");
and still the difference is big.
http://reglowa.ktr.pl/~ozi/image/vertical_text.php

ozi
Jul 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.