Fonts in TestQuest
Updated September 25, 2002
Created September 25, 2002


Autogenerated Site Map
Search this Site!:
Search this site powered by FreeFind

I generally learn each character, one at a time. I do not rely on "mass import" of many characters as I still have to make lots of adjustments, so why bother. Learn each character one at a time and learn each character well.

A character set (font) will have a fixed height which is determined by the first character you paste in. Before importing characters of your font you need to determine what is the highest and lowest characters -- generally you need to look at the at sign (@), the Dollar sign ($), and the underscore (_). I generally use the dollar sign ($) to compare where/how I need to grab a character. You must give enough spacing at the top and bottom of each character to place it correctly in the font file. (What I mean about correctly is that you don't want to mess with the vertical alignment of the characters -- you can't have the lower case letters touch the top pixel in their character cell, they should be positioned vertically in the correct manner -- just compare it back to the Dollar sign to see where they go vertically.)

I generally do not gather any whitespace on the left nor right of each character -- at least not on the first pass. I do generally take a white column of pixels on both the left and right of the exclamation point (!), the letters i, I, l, and L.

I generally copy my padded exclamation point over to the space (0x20) entry in the font manager and then I white out the exclamation point pixels to create my space character.

Since the font manager works off of a fixed width, you can get sloppy when copying in characters on the bottom side of the character. Be sure to pick the upper left corner of the character correctly, then move to the right side, then go down far enough to be sure you meet the height requirement -- if you go down too far, no problem, font manager will chop off everything below what it needs -- this way you don't have to count vertical pixels.

When comparing, I generally try to tell TestQuest what I'm looking for on the screen rather than trying to have TestQuest tell me what it sees. The reason for this is that I often have to work with the Helvetica font which is terrible because the lower case l is the same character (pixel for pixel) of the upper case I -- TestQuest is unable to differentiate because the font is a BAD FONT. There are other "Bad Fonts" out there.

As far as getting the fonts in, depending on the size, I generally make 2 lines and also make sure that "@" appears on both lines so I can compare. There's nothing worse than copying in one line in one manner, and the second line in a different manner -- if they aren't aligned vertically in the correct manner in their own cell, then you haven't correctly read in the font.

Don't let your "tolerance" for wrong pixels out too far or you'll only be reading garbage.


I generally make use of "bt_LocateGraphicsText" and state what I am looking for. I then often make use of "bt_GetFoundGraphicsTextLocation" to determine what was found where. These two calls make the most of my text reading functions.

I've used the other calls that "Read" text from a certain place; however, I shy away from using those unless I absolutely need to because I may have to deal with a "bad font" and I don't want to get bit by it.

Troubleshooting a font in TestQuest

When tweaking a font I would have something on the screen (like Hello World!), then I would create a bunch of bt_Locates that would incrementally try to read what was on the screen, this way you find out what breaks the font:

bt_LocateGraphicsText("H",...);
bt_LocateGraphicsText("He",...);
bt_LocateGraphicsText("Hel",...);
bt_LocateGraphicsText("Hello",...);
bt_LocateGraphicsText("Hello W",...);
bt_LocateGraphicsText("Hello Wo",...);
bt_LocateGraphicsText("Hello Wor",...);
bt_LocateGraphicsText("Hello Worl",...);
bt_LocateGraphicsText("Hello World",...);
bt_LocateGraphicsText("Hello World!",...);


Search this Site!:
Search this site powered by FreeFind

Homepage: http://www.cpqlinux.com
Site Map: http://www.cpqlinux.com/sitemap.html