Quick Links

Education Edu

Simulations Sims

Math Tools Math

Games Games

Generative ArtArt

Actinoscript Prog

Farmville Farm

 

 


Perfect Pop Up Panels Demo

Fonter, An Actionscript 3 Font Tool

Click the above-left picture of Fonter to start the application in a new window.

 
 

A Font Browsing Tool using Actionscript 3

History

Since the time I discovered pencils, I've liked to draw. There was a time when I used to think of myself as artistic, but as the vast majority of my creative juices have been sucked out by past employers, I tended to give what remained to computer related creations (and sometimes music).

On those occasions when I needed to act all designer-like, besides temporarily sporting a pony tail and rad glasses frames, I would spend a ridiculous amount of time in pedestrian tools like Microsoft Word, painstakingly modifying text, trying to find the one perfect font, past the point where they all began to look the same, to the point where I'd wake up and wonder what I was doing clicking the down arrow button on my keyboard.

I could certainly have used a tool which displayed my specific text in all the fonts available to me. If such a tool exists, and it probably already does, , , where was it when I really needed it?
I don't tend to do that quite as much anymore, but recently, I needed to find a font that had a lowercase "f" that had a particular shape to it. Naturally, I had no idea where I'd seen that f, if it was a font I had, from a bad dream, etc. So I went through my usual pain-filled search by hand. You will be excited to know I eventually did find what I was looking for, more or less.

Idea

Sometime after having to do this same laborious process for another three or four letters, the idea struck me that it should be possible to write code that would help me. After all, isn't that what computers are for? Now, if I only could find a programmer.

What if, I had a tool that would let me see what any character looked like, in every font in the known universe, or maybe all that happen to be on a given machine, or at least those that my actionscript 3 code seems to know about? That would be a good thing, right?

Then, what if it I make it show me all the available characters in that particular font, or at least those that happen to fit on my screen at its current resolution, or at least, the resolution I happened to be using when I programmed the thing, hereinafter to be referred to as the Font Tool. That, too, would seem to be on the "good" side of things, wouldn't it?

Approach

Ok. I'm imagining something with a bunch of letter "f"-s, lined up grid-like, covering most of the screen, perhaps showing the name of the font moused over. And what if it was possible to not have to rewrite the stupid thing every time I wanted to see this for a different letter, like maybe an input field to tell it which letter to display? Ok. I'm liking this. And then, of course, clicking on the specific letter, in it's specific font, would bring up a display of all the characters that are possible in that font, or at least those with character code values ranging from 1 thru 1024, or whatever it is I intend to set as the upper limit. Oooo, even like in a pop up panel that disappeared when you moused away from it.

Btw, what is the correct last digit to iterate up to? There's a bunch of hoaky looking characters in the high char code numbers that don't have the same look/feel as the std alphabet. If you know the answer, please let me know. Inquiring minds want to know.

Gosh, designing computer programs is easy. Just for grins, maybe I'll OOP-ify the code into nice reusable classes, for that extremely unlikely scenario when I would need to use this functionality in a different program. And now, for extra bonus points, I'll add field that shows a slightly larger version of the current letter in the current moused-over font, plus a handful of buttons to iterate forward/backward through adjacent letters. It's a shame that no one is willing to pay me money for these great ideas.

Result

Ok. Below is the result. Because it is relatively small, 550x400, and squished slightly smaller to fit in this blog's format, it would be prudent to see this puppy at your screen's full resolution. So if you value your eyes, click on the picture at the top of this blog to see it in a window that you can stretch to the full limits of your monitor's resolution

.

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

Code

Ok. So, normally, I'd just give you the code at this point, especially since this is a relatively short post, and I basically have run out of things to say, and also since no one in their right mind would be interested in it, but it really is just the canonical arrangement of textfields on the screen in a grid-like manner. If you can't figure out how to code that, then ask your neighbor's 13 year old son to do it for you. Arg, fine, if you really must have it, write me.

Btw, having just learned about mochibots from Emanuel Forento, (I know, in which world have I been living?), I've decided to implement it in just about everything from now on. This way, I'll be able to see if the darn thing ever gets used, etc. Go Mochi!