Download & Extend

Error "Unable to generate a signwriter image with font at size Array"

Project:Signwriter
Version:6.x-2.0-beta1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hi,

my site is generating the error "Unable to generate a signwriter image with font at size Array" The error is rather cryptic -- it's hard to figure out what it means and what can be done to fix the problem. Perhaps it might be a good idea to make it easier to understand what that error means.

Everything works otherwise, and the images are properly generated. Thanks for your module!

Albert.

Comments

#1

Title:improve readability of error "Unable to generate a signwriter image with font at size Array"» Error "Unable to generate a signwriter image with font at size Array"
Category:support request» bug report

The error here is actually that it says Array instead of the size. It should actually say the font size. So if that is fixed your problem is solved.

I would imagine if you are seeing this error then it is possible that not all of your signwriter text is being displayed as a signwriter image.

#2

I have the same issue here.

Drupal says exactly: "# warning: imagettfbbox() [function.imagettfbbox]: Could not read font in /home/svn/drupal6/sites/all/modules/signwriter/signwriter.module on line 628.
# Unable to generate a signwriter image with font at size Array."

Any ideas?

#3

What are your font settings for the profile that is failing (primarily font-size value)?
If you don't know which profile it is give them all.

#4

I left the default font size to 20 for testing the module.

#5

I was getting that same error -- however the font sample (one font available) wasn't generating. I uploaded some other true type fonts and they worked fine -- so it was a problem with the actual TTF font file. Don't know why, but I thought I'd offer that a troubleshooting tip.

#6

I have the same error. In my case headers in Russian are OK, in English are errors. Take a look on header in Russian - http://oribern.ru/ru and on absence of header in English - http://oribern.ru/en. Same are for page titles.
Settings of site header:
Font - Heuristica Bold
Size - 24
Multiline on
Three state off
Shadow on
Transparency on
Border off
Max width - 700
Align - left
Image type - png

#7

i have the same issue, its because $image->fontfile[0] is 0 (NULL),

#8

Category:bug report» task

Same problem here.
Solution is : download the font arial for example here (http://www.fontemple.com/free-download/612-Arial.html) and place it in the signwriter directory where you call the font name do it like this:

$profile->fontfile = drupal_get_path('module', 'signwriter'). '/Arial.TTF';

Why it doesnt detect a basic font like arial I dont know. I have this problem localy on windows7 and ubuntu. As on the server which runs Centos. The arial files are in fact present on all three Operating systems.

#9

Category:task» bug report

Must of slipt to task. Sorry.

#10

Another related question: Why is this error being shown to anonymous users on the front page??!!!

edit: In my case the error was being caused by a change my shared host made to the directory structure. I had used an absolute path for the fronts folder and fixed it by changing it to a relative path... ended up using: ../public_html/fonts

#11

Yes, same issue here : Image fontfile[0] is null, but I noticed that it does that only for special caracters or accents.

I have set "All" in the Allowed non-ASCII characters field in profile config. So I get the error, but the image for the word, and the special character is well generated !

Don't know how to fix it...

#12

Same problem, but it only occurs when using a profile name with special characters or spaces. Try to use another (simple) profile name and, if you are using loading of profiles manually in your theme, ensure the signwriter_load_profile('[name of profile]') has exactly the same profile name.

#13

Not sure why, but the solution in #12 seems to remove this error from appearing on my site (removing spaces from the profile names).

nobody click here