Re: TTF fonts for Linux
| From: | Mike Morton | Date: | Tue, 29 Apr 2003 21:28:57 +0000 |
| Subject: | Re: TTF fonts for Linux | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145698@lists.php.net to get a copy of this message | ||
Thanks to Tyler and Warren for their feedback....
I am trying the corefonts from sourceforge, but running into other build
problems.. Anyhow - that brings up another question about fonts for use in
the loadfont()
If TTF fonts are for windows, or Mac, what kind of fonts can we use for
linux and php to do string writes on an image? Is there any other kinds of
fonts (well duh, of course there are) that can be used that will look decent
writing onto an image?
Example:
header ("Content-type: image/jpeg");
$im = imagecreate ($width, $height);
$background_color = imagecolorallocate ($im, $bcolor[0], $bcolor[1],
$bcolor[2]);
$text_color = imagecolorallocate ($im, $tcolor[0], $tcolor[1], $tcolor[2]);
imagestring ($im, $size, 5, 5, "A Simple Text String", $text_color);
imagejpeg($im);
Where the background is white, with red writing, and the font type is a
default php font (1-5) - the writing is terrible, it is all, well, spotty is
the best way that I can describe it.....
Bascially I am looking for a way to write text to an image that will look
good, and have a selction of fonts to choose from for the user.
Also - as a side note, is there a way to print different font sizes to an
image? I.e. Arial 10pt or Arial 12 pt ? I cannot find anyting on this.
Thanks again! :)
On 4/29/03 4:01 PM, "Tyler Lane" <tlane@lyrical.net> wrote:
> http://corefonts.sourceforge.net/
>
> On Tue, 2003-04-29 at 12:53, Mike Morton wrote:
>> Okay - this is driving me nuts!
>>
>> I have been trying to do an image creation script - and I can get everything
>> working fine, but where in the world can I find TTF fonts that I can use
>> rather then the crappy default ones :)
>>
>> I am running on a linux box, and I swear I have looked everwhere I can think
>> for for 2 days, searched google (a tonne of info on ttf fonts - but maybe I
>> am too stupid - cannot find anything for linux)
>>
>> Specifically - I just need the basics, Arial, Helvetica, Times, etc
>>
>> I know unix a bit - not much on Linux in particluar (do not send me to get
>> an RPM - I have no idea how or where to install them....) but if anyone can
>> give me ANY information on where to get TTF fonts, specifically the base
>> microsoft types, then I would appreciate it VERY much :)
>>
>> TIA
>>
>>
>> --
>> Cheers
>>
>> Mike Morton
>>
>> ****************************************************
>> *
>> * Tel: 905-465-1263
>> * Email: mike@webtraxx.com
>> *
>> ****************************************************
>>
>> "Indeed, it would not be an exaggeration to describe the history of the
>> computer industry for the past decade as a massive effort to keep up with
>> Apple."
>> - Byte Magazine
>>
>> Given infinite time, 100 monkeys could type out the complete works of
>> Shakespeare. Win 98 source code? Eight monkeys, five minutes.
>> -- NullGrey
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
--
Cheers
Mike Morton
****************************************************
*
* Tel: 905-465-1263
* Email: mike@webtraxx.com
*
****************************************************
"Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up with
Apple."
- Byte Magazine
Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey