I'd like to know how to do this too![]()
You could always use sIFR - but yeah, you can specify which font you use in GD.
You could, really stupid way, save each individual letter of Volter font with border in a folder and then replace each input letter with the url to the image.
Basic GD GET header would look like:
The output will be something likePHP Code:<?php
header("Content-type: image/png");
$text = htmlspecialchars($_GET['t']);
$im = imagecreatefrompng("images/header_bg.png");
$font = "volterb.ttf";
$white = imagecolorallocate($im, 255, 255, 255);
imagettftext($im, 7, 0, 9, 14, $white, $font, $text);
imagepng($im);
imagedestroy($im);
?>
But if you want to put a 1px border round the letters it will be much much more complicated.
Damn, I want the border. lol. Thanks though, this will come in handy. +repBasic GD GET header would look like:
The output will be something likePHP Code:<?php
header("Content-type: image/png");
$text = htmlspecialchars($_GET['t']);
$im = imagecreatefrompng("images/header_bg.png");
$font = "volterb.ttf";
$white = imagecolorallocate($im, 255, 255, 255);
imagettftext($im, 7, 0, 9, 14, $white, $font, $text);
imagepng($im);
imagedestroy($im);
?>
But if you want to put a 1px border round the letters it will be much much more complicated.
Also if you can explain how to do it with a border?:s
EDIT: Need to spread, in sig.
Last edited by HabbDance; 30-11-2008 at 09:27 PM. Reason: Need to spread rep.
+.net - omg it's coming o_o
Here's a simple black border, it's not as thick as the other one though:
It's just --SS--'s code modified:
PHP Code:<?php
header( "Content-type: image/png" );
$text = htmlspecialchars( $_GET ['t'] );
$im = imagecreatefrompng( "header.png" );
$font = "volterb.ttf";
$white = imagecolorallocate( $im, 255, 255, 255 );
$black = imagecolorallocate( $im, 0, 0, 0 );
imagettftext( $im, 7, 0, 8, 15, $black, $font, $text );
imagettftext( $im, 7, 0, 9, 14, $black, $font, $text );
imagettftext( $im, 7, 0, 10, 15, $black, $font, $text );
imagettftext( $im, 7, 0, 9, 16, $black, $font, $text );
imagettftext( $im, 7, 0, 9, 15, $white, $font, $text );
imagepng( $im );
imagedestroy( $im );
?>
Thanks so muchHere's a simple black border, it's not as thick as the other one though:
It's just --SS--'s code modified:
PHP Code:<?php
header( "Content-type: image/png" );
$text = htmlspecialchars( $_GET ['t'] );
$im = imagecreatefrompng( "header.png" );
$font = "volterb.ttf";
$white = imagecolorallocate( $im, 255, 255, 255 );
$black = imagecolorallocate( $im, 0, 0, 0 );
imagettftext( $im, 7, 0, 8, 15, $black, $font, $text );
imagettftext( $im, 7, 0, 9, 14, $black, $font, $text );
imagettftext( $im, 7, 0, 10, 15, $black, $font, $text );
imagettftext( $im, 7, 0, 9, 16, $black, $font, $text );
imagettftext( $im, 7, 0, 9, 15, $white, $font, $text );
imagepng( $im );
imagedestroy( $im );
?>Worked a charm. +rep. Is there anyway I can make a transparent background though? Because when I tried it simply didn't appear:rolleyes:
+.net - omg it's coming o_o
Want to hide these adverts? Register an account for free!