ron@WAYBACK.UNM.EDU (11/17/88)
How does one go about writing an X11 client independent of the server release? Here is an example: say you have a client and you want it to work on R2 and R3, but it uses Fonts. Problem: R2 Fonts use the file name convention and R3 Fonts use the ISO Latin-1 naming convention. Soln: Maybe one of the display macros will tell me the release number? XVendorRelease will return a number related to a vendor's release of the X server. Our MIT servers return 2 for R2 and 3 for R3, but one of our DEC machines is running DECWINDOWS (vendor = "DECWINDOWS DigitalEquipmentCorp.") and returns (release = 11) I guess this is okay, since this is the vendor release of the server. Problem: Why doesn't the display structure have an entry for the MIT X Consortium based revision number? *OR* some other method for telling clients what the server expects, be it fonts names or what ever else will change in coming releases. I hope that I'm missing something! But if I'm not, how are we going to ever write independent server release clients? VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV Ron E. Neher University of New Mexico Dept. of Electrical & Computer Engineering Albuquerque, NM 87131 (505) 277-0809(office)/0801(lab) NET-ADDRESS: ron@wayback.unm.edu OR ron%wayback@ariel.unm.edu ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (11/17/88)
The protocol hasn't really changed from release to release,
so in most ways portability should not be an issue. The
subject of fonts is important, but it has almost nothing to
do with "releases". There are no standards for what fonts
a server must provide. The way you write a portable client
is to make sure that font names are resources that can be
changed by the end-user or site admin. You'll probably want
to "build in" default font names, either in an app-defaults
file or in your code, but your code ought to be robust
enough to fall back on the default font in the GC if all
else fails.
If you have particular fonts that you want to use, and
you have them in source (BDF) form, then most server
vendors should be supplying a font compiler with their
server, allowing you to import fonts.
R2 Fonts use the file name convention and R3 Fonts use the ISO
Latin-1 naming convention.
The R3 convention isn't "ISO Latin 1", that's a character set
encoding. R3 provides a mechanism for enabling file names as
aliases (see the mkfontdir man page). You can also just
use your R2 fonts with an R3 server, so you can certainly
place R2 fonts in a directory and allow users to add it to
their font path. We tried reasonably hard to provide backward
compatibility capability for R2 clients.
Why doesn't the display structure have an entry for the
MIT X Consortium based revision number?
The vendor name and release constitute this information.
*OR* some other method for telling clients what the server expects,
be it fonts names or what ever else will change in coming releases.
If the protocol changes in some significant way, the protocol minor
version will change, and that will be the indicator.
But if I'm not, how are we going to ever write independent
server release clients?
By providing configurable font (and color) resources.janssen@titan.sw.mcc.com (Bill Janssen) (11/18/88)
So far as I can tell, one can never count on having any particular font with a particular server. Is there some default font that is guaranteed to work with any server (perhaps "default")? Is there some way of using a "server default" font? I suppose I could just ask for a list of one font, and use that... though it's not clear that a server is guaranteed to have *any* fonts. Bill