Do not read this file. If you want to change the fonts in MrEd, use the preferences dialog instead. Ok, if you're still reading, you must really want to do something that can't be done via the preferences dialog. Most likely, it *can* be done, and this file will tell you how if you're pantient enough. --------------------------------------------------- 1. Welcome to the Weird World of MrEd Fonts --------------------------------------------------- MrEd's font system is designed to appear to work gracefully across platforms to a naive MrEd user. It is also designed to provide complete configuration control to a knowledgeable user (this may be especially necessary under X Windows). These are somewhat contradictory goals, and leave MrEd with a somewhat complex font system. Terminology will be developed here to explain the working of the font system, but do not expect these terms to be used by the MrEd toolbox. The toolbox is designed to do what a programmer or user probably wanted using names that a programmer or user would probably understand intuitively. A "real font" is a device-speicific font used to draw or measure text for a screen or a printer. MrEd handles three kinds of real fonts: * Screen fonts * PostScript font names * AFM font files An "abstract font" is a platform- and device-independent entity that describes a font. MrEd uses 8 abstract fonts: * "Default" * "Decorative" * "Roman" * "Script" * "Swiss" * "Modern" * "Teletype" * "System" The "System" abstract font is intended only for use with screen-based controls. The "Teletype" abstract font is rarely used. There are two basic problems: * Mapping abstract fonts to real fonts * Specifying a real font without a corresponding abstract font The solution in the latter case is simply to let the user or programmer invent new abstract fonts. However, the new abstract font is associated with a core abstract font so that a suitable default real font can be selected when no information about the new abstract font is available. Abstract fonts are mapped to real fonts via the low-level setup resource file read by MrEd at startup time. (Under X Windows, X resources can be specified in any way, but specifying X resources through the startup file is the preferred mechanism.) In the case of real fonts for an X Windows screen, it is necssary to map not only an abstract font toa real font, but an abstract font combined with a weight, style, and size to a real font - hence, the insane complexity of MrEd's font system. --------------------------- 1. Resource Entries --------------------------- First, we consider the mechanism tha maps abstract fonts to real fonts in the case that the information is provided via resources. To find a font name in the resource, MrEd looks for a resource item named by: