Running Drupal 5.1, php5.2, have created signwriter-cache/ and fonts/ folders in theme folder with 777 permissions. Every page prints this error:

    * warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in /sss/xxx/xxx.com/htdocs/modules/signwriter/signwriter.module on line 534.
    * Is your font set correctly in the signwriter profile?

There is a font in the fonts/ directory.

I've done a ton of searching but am not finding much via Google to help me resolve this problem with Drupal. I wonder if you can provide any assistance in getting signwriter to work so I don't have to switch to sIFR or a self-made solution?

Thanks,

Bob

Comments

bobwaycott’s picture

Nevermind. Apparently the problem was me storing fonts in the 'themes' folder. When I moved the fonts under files/ the error went away.

However, now none of the generated images are showing up. I can see them listed in the signwriter-cache folder, but there is no display in four different browsers. I have tried adjusting the filter order, but am getting nothing.

bobwaycott’s picture

If this helps:

Checking on the Activity error in Safari, the browser reports it cannot find the host for the generated signwriter file.

bobwaycott’s picture

SOLVED.

For those that might run into this:

I had to create both cache and fonts directories in the files/ folder with 777 permissions.

Also, I had to set the fonts directory as 'files/fonts/' (without the ' ') and the cache as 'signwriter-cache/' (without the ' ')

Without the directories set exactly like that, nothing worked. The module wouldn't even accept the full system path for these settings.

Thanks for the module. Now that I have it working, I like it a lot. And it works properly in all browsers (sIFR is great, but Linux doesn't support transparent Flash)

Thanks again.

bobwaycott’s picture

This problem is back, and there have been no changes in my setup.

usonian’s picture

I believe this should work as long as the web server has read permissions on the font file itself - I was getting the imagettfbbox() error on a local OS X install, then I looked at the font file and its permissions were set to 600. Setting them to 644 did the trick.

Agileware’s picture

Status: Active » Fixed

Hopefully some of these issues have gone away with the development release of signwriter. You now have the ability to set both the cache directory and the search path for fonts.
The majority of issues people have with this module, is purely permissions/directory locations.

Thanks for your input, we're trying to make this more user friendly.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

-Slava-’s picture

Don't know if that will help someone, but i got this error
* warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font ...
when i used in a script font that wasn't installed on my system (Ubuntu 8.4)
Just copying the font file into the folder where the script resided didn't help.

SOLUTION: I copied the font into "/usr/share/fonts/" and execute "sudo fc-cache -f -v"

The php seemed to search for that font only in system fonts directory..

jboeger’s picture

I am still having this problem w/ a fresh Drupal 6.60 installation.

The error:

Fatal error: Call to undefined function imagettfbbox() in /home/avalonvi/public_html/superclean/sites/all/modules/signwriter/signwriter.module on line 843

I believe I have all my permissions squared away. Stumped!!

Agileware’s picture

function imagettfbbox() is a php function so it would seem to be an issue with your install of php, not signwriter.

Possible causes are:
* You are running a php version earlier than 4, which is extremely unlikely as Drupal requires at least 4.3.5.
* You do not have the GD library. - To check this you can download and enable the devel module and click it's phpinfo() menu item or run this script:

<?php
  phpinfo();
?>

On the phpinfo screen in the section titled 'additional .ini files parsed' one of the files should be called gd.ini.

If you don't have that file listed then you will have to install the GD library.

Hopefully this helps you.

drupal_841’s picture

You are awesome! This works for me.

roper.’s picture

I'm getting the same error and I can't figure out why.

- I have a profile named "Title" which recognizes my font file in the select-box
- files directory is 775
- files/signwriter-cache is 775
- files/chops.ttf is 644
- Drupal 5.7, PHP 4.4.9
- GD library should be fine since I have imagecache working without problems

I'm using this code in my theme's page.tpl.php file:

if ($title != '') {
    $profile = signwriter_load_profile('Title');
    // at this point you could override any settings. for example:
    // $profile->fontsize = 43; // override the font size
    print signwriter_title_convert($title, $profile);
}

The HTML output is:
<span style="display: none;">Page title</span><img alt="Page title" src=""/>

No images are created in the signwriter-cache folder. Any help would be MUCH appreciated, as this module sounds awesome! Thank you.

roper.’s picture

Status: Closed (fixed) » Active

Sorry, forgot to re-open the issue (that's what I'm supposed to do, right?). Also, I should point out that I've tried modifying all relevant files and folders to 777 permissions just in case, but it made no difference. :-/

apaderno’s picture

Title: * warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font » imagettfbbox() could not find/open font
biscuit.tech’s picture

make sure your file extension is lower-case, .TTF -> .ttf - that did the trick for me.

h-man24’s picture

Hello Folks,

in my case, i'm trying to use signwriter to change the box titles. The paths are fine, GD is installed, so the grafics are created in signwriter-cache, but i still get the error

warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in .../sites/default/modules/signwriter/signwriter.module on line 623.

any trick to solve this problem? i'm using Drupal 5.18

thanks in advanced

Stefan

h-man24’s picture

damned,

Problem solved. In the example is a little mistake.

$signwriter = signwriter_load_profile('Block title');
$signwriter->text = $block->subject;
$url = signwriter_url($signwriter);
print '<img src="'. signwriter_url($Signwriter) .'" alt="'. $block->subject .'" />';

<img src="'. signwriter_url($ S ignwriter) .'" alt="'. $block->subject .'" />

should be

<img src="'. signwriter_url($ s ignwriter) .'" alt="'. $block->subject .'" />

now its working fine.

Agileware’s picture

The example in the documentation page, http://drupal.org/node/336075

Has been updated, small typo. Thank for pointing that out @h-man24.

HongPong’s picture

I should add that sometimes it seems PHP can't parse all ttf fonts. To determine this, put in a more generic (i.e. for example a common Microsoft) font, and then the font you're working with.

If it parses the more generic font but not yours (and you double checked permissions are the same) then you at least know where the problem is. I'm there right now...

hixster’s picture

I was suffering from this issue , and was poking around for ages trying to fix it, checking font paths etc...

Eventually I found that I had deleted one of my profiles and in the menu setting tab I still had that (old deleted) profile selected for use which was causing the error.

Hope that helps.

Hix

Agileware’s picture

Is this still a problem?

Have any of these latest suggestions helped?

DuaelFr’s picture

Status: Active » Closed (won't fix)

This version of Signwriter is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.