Coordinate Space Problems

The biggest difficulty with the handling of coordinates is that the text-based font used on the text layer may be an inappropriate size for use in locating graphical objects. There are a couple of reasons for this. One is that the text-layer font must be a fixed-pitch font, while the font used by graphical objects is usually variable-pitch. Frequently this means that the two fonts will be different sizes. The second problem is that some common graphical controls (for example, entry fields) are surrounded by a box, which makes the control much larger than its font would otherwise suggest.

For example, under Windows 98 on a VGA display, the height of the usual text-layer font is 15 pixels. The height of the font normally used for entry fields is 13 pixels. The height of a boxed entry field is 50 percent larger than its font, so a boxed entry field is 13 * 1.5 (round up) = 20 pixels high. This means that each boxed entry field is 20 / 15 = 1.33 lines high.

While you are free to specify any coordinates needed to produce the look you want, working largely with non-integer values is difficult and reduces portability. It also makes converting text-based programs much harder, because the text-based coordinates may not be the correct ones for the corresponding graphical objects.