You are here

function image_gd_textimage_get_font_path in Textimage 7.3

Return the path of the font file, in a format usable by GD.

File

effects/textimage_text.gd.inc, line 10
GD2 toolkit for image manipulation within Textimage.

Code

function image_gd_textimage_get_font_path($image, $data = array()) {
  $font_wrapper = file_stream_wrapper_get_instance_by_uri($data['font_uri']);
  if ($font_wrapper instanceof DrupalLocalStreamWrapper) {
    return $font_wrapper
      ->realpath();
  }
  else {
    return is_file($data['font_uri']) ? $data['font_uri'] : NULL;
  }
}