fonts.scale

Asked by Jeff Sterup

  i am trying to use the glassy buttons software for a project I'm doing. I'm having a problem with the fonts.scale file. All the fonts are showing up in the dropdown as urw. The path that was in the original buttonincludes.php file didnt exist on my server so I pointed it at /usr/share/fonts/default/Type1/. This folder has a fonts.scale file in it but it doesnt seem to be in the same format. I have fixed several other issues with the code but can't seem to figure out how to fix this one. Am I missing something to get this to work or is it just not written to run with my linux version. Ive checked other servers that we manage and they have the same path to the fonts.scale and the same format which doesn't seem to stick to any sort of pattern.

Question information

Language:
English Edit question
Status:
Solved
For:
buttonmill Edit question
Assignee:
No assignee Edit question
Solved by:
Jeff Sterup
Solved:
Last query:
Last reply:
Revision history for this message
Eric Dennison (ericd-netdenizen) said :
#1

The path can point to any directory that has a collection of .ttf files. Each of the .ttf files will become an item in the font selection pulldown.

If any of the files is not a truetype font file, then I don't know what I would expect it to do.

Revision history for this message
Jeff Sterup (foomagoo) said :
#2

  What I had to do is change this if statement:

if ($res = file($fontspath."fonts.scale"))

to this if statement:

if (file_exists($fontspath) && $res = file($fontspath."fonts.scale"))

This checks the file before loading so no errors are thrown.

Then I created a directory called fonts (which is what the script is looking for but it doesnt exist) and placed my .ttf files in that. Then it loaded my font files into the list.