Jump to content

TTF text generator


forumnz

Recommended Posts

Hello

 

I am using a script I found on the internet to create PNG images of text into a font on the server.

 

My problem is that I  can't seem to make the font bold.

 

Can someone please let me know how to do this? I would really appreciate the help.

 

Here is a snippet of the code that I believe needs modifying:

<?php
$background_rgb = hex_to_rgb($background_color) ;
$font_rgb = hex_to_rgb($font_color) ;
$dip = get_dip($font_file,$font_size) ;
$box = @ImageTTFBBox($font_size,0,$font_file,$text) ;
$image = @ImageCreate(abs($box[2]-$box[0]),abs($box[5]-$dip)) ;
?>

 

Many thanks.

Link to comment
https://forums.phpfreaks.com/topic/227122-ttf-text-generator/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.