LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 12-02-2004, 09:31 AM   #1
KR-data
LQ Newbie
 
Registered: Nov 2004
Location: Denmark
Distribution: Slackware
Posts: 20

Rep: Reputation: 0
Question Convert TTF to BMP


Hi

I got a simple little problem.

I got a TTF-file, and I gotta convert it to BMP, so I can use it with a PHP-function.


PHP Code:
mageloadfont() loads a user-defined bitmap font and returns an identifier for the font (that is always greater than 5so it will not conflict with the built-in fonts). It returns FALSE in case of error
And a code example:

PHP Code:
<?php $im imagecreate(5020); $black imagecolorallocate($im000); $white imagecolorallocate($im255255255); imagefilledrectangle($im004919$white); $font imageloadfont("04b.gdf"); imagestring($im$font00"Hello"$black); imagepng($im); ?>
I hope I'll get a fast answer.

Best regards
Rohde
 
Old 12-02-2004, 10:07 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,121

Rep: Reputation: 121Reputation: 121
Open up your favorite image manipulation program like.. The Gimp and change its format accordingly.
 
Old 12-02-2004, 10:23 AM   #3
KR-data
LQ Newbie
 
Registered: Nov 2004
Location: Denmark
Distribution: Slackware
Posts: 20

Original Poster
Rep: Reputation: 0
Ok, and in earth language. Sorry, but I'm a n00b in Linux. I know Gimp, but it doesn't seem to support the TTF-format :S
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bmp bmpx kaon Linux - Software 1 11-06-2005 01:26 AM
BMP Charset gamehack Slackware 0 04-26-2004 09:58 AM
BMP to JPG how to merlin371 Programming 7 01-10-2004 05:59 PM
converting .bmp to .jpeg wincrk Programming 5 03-04-2003 08:21 PM
Any way to convert ttf fonts to linux console fonts? Glockage Linux - Software 7 12-30-2002 06:41 AM


All times are GMT -5. The time now is 11:05 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration