473,395 Members | 1,577 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

imageloadfont

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
6 7141
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
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
"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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Fabian Rossbacher | last post by:
hello, does anybody know how to change font-face in Arial,Verdana etc. when i'm using image-functions of PHP? Font-Size is clear to me... $fontSize=2 imagestring($im, $fontSize, $px,...
5
by: comp.lang.php | last post by:
I have a PHP script that has only one line: <?php error_reporting(E_ALL & ~E_NOTICE); ?> When run as CLI PHP I get an extremely large number of warnings, errors and notices, all related to the...
1
by: Ask Josephsen | last post by:
Hi I want to create an image with vertical text, but how do I handle special chars like "זרו"? I'm using php version 4.4.2. This is my code so far: $string = "זרו"; $fh = 6;
8
TheMadMidget
by: TheMadMidget | last post by:
I had no problem with this code on my school's server, but when I moved it to mine it didn't work at all. Before it would make an image and display the text where I wanted it to, but now if Firefox...
0
by: serdar | last post by:
Has anyone created a GD font to use with imageloadfont() function in GD library? I need a tutorial or some guidelines if you have any. I particularly need the GD version of bitmap Tahoma Bold 10px...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.