Can This Text Hook Be Saved?
So, you have ImageFX version 4.xx and you still get crashes when using the Text Hook? hmmm? I may have a solution to this problem. I can't promise anything because this is a theory that hasn't been tested extensively by alot of people. But it's an idea that may help. So here we go:
When you start the Text Hook it reads the fonts in your assigned font directory and makes a simple text file with this list of fonts. IFX puts this file in Ram:ENV/ImageFX4/ and it's called "TextFontCache". This is what the top of my TextFontCache file looks like:
The rest of the file just has alot more fonts listed but I think you can get the idea from this part of it. Notice the Format info. You can actually alter this file if you wish. Add fonts in other locations and that sort of thing. Now, initially, my reason for even noticing this file was that once IFX generates it, it no longer takes minutes (on a real Amiga, anyway) for IFX to read your font dir every time you load up IFX's text hook. Once I've had IFX make this file I can save it to my ImageFX4: dir
You can save your file anywhere but I keep it in my IFX dir just to keep
things tidy. Some people like to save it Prefs:ENV-Archive/ImageFX4 so that it automatically loads into ram
at each bootup. However, if you add new fonts you have to generate a new file and that means removing the file from
The command in this script is:
Address Command "copy Ram:ENV/ImageFX4/TextFontCache to ImageFX4: quiet"
Now, in the ImageFX4 Icon I have added a Tooltype command which runs another script which takes the cache file and copies it TO ram:
This script (both mentioned scripts are available in the cache archive) has the reverse command:
Address Command "copy ImageFX4:TextFontCache to Ram:ENV/ImageFX4/ quiet"
You can, of course add this last command elsewhere including in your StartUp file. It's your system, do whatever works for you. The point is that whenever you start the Text hook, you won't have to wait for the generation of a new cache file. It will already be there. Plus, if you want the file to be saves to Prefs:ENV-Archive/ImageFX4, you can alter the scipts to say that.
Now, here we come to the next bit of Voodoo. In my fonts dir I have the usual assortment of Amiga fonts and Postscript fonts. But these days I get alot of new fonts off the internet and they are all of the TrueType variety. On my real Amiga I put those in my Wordworth directory because that program can directly read TrueType. Anyway, to convert these fonts I use ttfmanager. It's a nifty little program that easy to use! It makes a ".font" and ".otag" file for each TrueType font I install in my regular fonts dir. You, of course, are free to place these fonts in a separate dir to be tidy. This is epecially useful if you have LOADS of fonts. And remember, you can change the location of a font right in the TextFontCache file! Ah Hah!
Ok, so now we've got a bunch of cool fonts where we want them. We've got a nice list, we're all set to make make some RAD titles with IFX and BAM! The Text hook crashes big time! Whats Up!!!!
This has happened to me occassionally and I'm just as perplexed as the rest of you! After all, I beta-tested so many versions of the Text Hook my head is still swimming! And whenever I tested Amiga bitmapped fonts I never had a crash. So.....somethings up???? yes?
Well! The other day after I had installed about three or four new TrueType fonts, saved my new TextFontCache file, Blah, blah, blah. I was ready to Rock and Roll and Every One of these new fonts crashed. AAHHHHHH!!!!!! What the F@#$$% !!!!!!
I had started IFX right from boot, nothing else was running, everything was clean, and thought I had everything under control....but crash, crash, crash! So I looked at the TextFontCache file just because I couldn't think of anything else to do. And I noticed a very interesting thing. If you look at the cache.gif picture above you'll see for example that the first font, 3D has (after the "1" which means it's an Amiga font) two sizes listed - "72" and "144". But other fonts have NO SIZES listed. Look at ACharmingFont. After the "1" there is nothing. I looked at the fonts that were crashing and guess what? Go ahead, I bet you can't guess????? yep! None had sizes listed. So guess what I did next? I'll bet you can't guess. Since I had noted while I was in the Text hook what sizes I needed each font to be as I was working on it (and before they each unceremoniously crashed!) I inserted each size for each troubled font into the TextFontCache file. Now, I started the Text Hook and tried to make a text. Guess what???? (I'll bet money ya can't guess!!)) No crashing. Go figure?
I have noticed that some fonts don't mind not having sizes. But it seems that some do. I can't really explain this and I'm not Totally sure this will solve everyone's text crashes. I haven't fully tested this idea. I mean, what happens when I want to use a size that I haven't listed yet? We shall see. However, as of now, everytime I come across a font that crashes I will note if it stops crashing once a size has been indicated. I suggest you all do the same and maybe we'll finally figure out this damn mystery, already!
The complete contents of this site are unless otherwise indicated.
The contents may not be reproduced in whole or part, in any form, without prior written consent from cecilia. You have been warned ;)
Need help with this topic? Email Me