The TrueType Font Bounding Box : TrueType Fonts : Graphics Image PHP Source Code


PHP Source Code » Graphics Image » TrueType Fonts »

 

The TrueType Font Bounding Box



<?php
     header ("Content-type: image/png");
   
     $font_size = 15;
     $im = ImageCreate (300500);
     $grey = ImageColorAllocate ($im, 230230230);
     $black = ImageColorAllocate ($im, 000);
     $bbox = ImageTTFBBox($font_size, 0"ARIALBD.TTF""Bounding Box!");
   
     for($i = 0; $i < 7; $i++){
          ImageTTFText($im, $font_size, 010($i * ($font_size * 2)) 25,$black, "ARIALBD.TTF""$bbox[$i] = $bbox[$i]");
     }
     ImagePng ($im);
     ImageDestroy ($im);
?>
           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Graphics Image
» TrueType Fonts