garya@stan.com (Gary Aitken) (12/13/88)
No-one should ever do anything with the default font. ...You certainly cannot display any characters with it, since you cannot predict the encoding it uses. Note that not even my Hello World program ... tried to use the default font. That's wonderful. But note that uwm, xterm, and a few other "real" clients DO use the default font. Also note that the R3 Xt stuff occasionally reaches into GC's to get the default font. The only reason it exists is to prevent there being a "No-font-selected" error. Is this really so? I would have thought the reason for a default font was to allow at least some level of functionality when the standard font library or a requested font was unavailable. In particular, it should be possible to run applications from a server when the standard font library, possibly located on a remote file system, is unavailable because the network is down. I'm willing to bet that your code assumes that the encoding for the default font is ISO Latin-1. In the sense that error messages are currently written in English and not obtained from a language translation mechanism, yes. They should work just fine otherwise. Therefore, the concept of "the" default font does not exist. Fine. All most applications care about is "a" default font, and as long as it works reliably, it's sufficient. The above remarks bring up some items which I think need clarification. What IS the purpose of the default font? What operations are considered valid for it? I may have made some incorrect assumptions. If so, then a lot of other "example" code does also, such as uwm and xterm, and I would suggest we get them "in proper form", as they are probably being used as models by a lot of different people.
dshr@SUN.COM (David Rosenthal) (12/13/88)
> > That's wonderful. But note that uwm, xterm, and a few other "real" clients > DO use the default font. Also note that the R3 Xt stuff occasionally reaches > into GC's to get the default font. > These are all bugs. Anything that outputs characters using the default font is a bug. > > In the sense that error messages are currently written in English and not > obtained from a language translation mechanism, yes. They should work just > fine otherwise. > This is a bug. You are assuming that the encoding of the default font is ISO Latin 1. > Fine. All most applications care about is "a" default font, and as long as > it works reliably, it's sufficient. > What do you mean, "works reliably"? In my book, it means "produce legible output". Assuming that the encoding of a font that happens to appear in a newly-created GC has ISO Latin 1 encoding is not reliable in this sense. Assuming that all the font IDs that appear in newly-created GCs are the same, or refer to the same font, is also not reliable. > The above remarks bring up some items which I think need clarification. > What IS the purpose of the default font? What operations are considered > valid for it? I may have made some incorrect assumptions. If so, then a > lot of other "example" code does also, such as uwm and xterm, and I would > suggest we get them "in proper form", as they are probably being used as > models by a lot of different people. > They do need to be fixed. Anyone who wants a font which has ISO Latin 1 encoding but doesn't care about other characteristics should consult the R3 document about font naming, and use the conventions there to express their requirements. I imagine that xterm, for example, has other requirements such as fixed-pitch, and the conventions should be used to express them, too. David.
rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (12/17/88)
The only reason it exists is to prevent there being a "No-font-selected" error. Is this really so? Yes, that was a major reason for its existance. I would have thought the reason for a default font was to allow at least some level of functionality when the standard font library or a requested font was unavailable. The possibility of that of course increased the desirability of a default font. But, as Rosenthal has pointed out, there are potentially unreasonable assumptions that must be made to make use of a default font.