[comp.windows.x] xplato

mouse@SHAMASH.MCRCIM.MCGILL.EDU (der Mouse) (06/13/90)

> I welcome any comments; this is my first X application and I'm sure
> much of the X stuff is not done optimally.  One area that was a real
> sticker was supporting the alternate PLATO character set.  The PLATO
> protocol defines the ability to define any 8x16 font code on the fly.

Ouch.

> I cooked up the most obvious and hopefully the most portable way to
> do this in "charset.c" by actually building a BDF file and
> system(3)-ing off the appropriate X command to compile and install
> the font.

Gack.  This strikes me as an ugly kludge and is dreadfully nonportable.
See below.

> The upside of this is that you can run more than one XPLATOs on a
> single X workstation, each with it's own alternate character set.
> The downside is that you can't "-display another_host" under this
> scheme, since YOUR X server has to know where the alternate font is.

It also renders xplato completely useless with X terminals, though
that's really just another aspect of the same problem.  You're assuming
the xplato client shares a filesystem with the server.

> Seems one of the least-networked features of X is fonts.

True.  IMO X needs the ability to shove a bitmap into a font glyph
position.

I wrote a program that wanted to display double-size characters.  What
I eventually did was to generate bitmaps and display them with
XCopyPlane.  I would strongly recommend you do the same.  Actual
displaying of the characters will probably be slower than using fonts,
but it will almost certainly cut down drastically on the overhead and
will actually be portable, even to X terminals and the like.

Once the network comes back up and I can connect to fsu to try it out
(at the moment my attempts to reach fsu don't get past
fla-state-u.sura.net), I'll likely hack on it to fix the alternate
charset issue.  (I have a question, first; does the protocol place a
limit on the size of an alternate character?  As I recall from my PLATO
experience (years ago), it does, and as you imply as much in the first
paragraph I quoted.)

I also notice the presence of a line-drawing mode.  Does the PLATO
protocol specify pixelization rules, and did you make sure your X code
follows them if so?

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu

(A copy is being sent to xpert in the hope of keeping someone else
from making the same mistakes.  They're natural mistakes for someone
new to X, but still mistakes.)

bauer@loligo (Jeff Bauer) (06/14/90)

In article <9006131001.AA04603@shamash.McRCIM.McGill.EDU> mouse@SHAMASH.MCRCIM.MCGILL.EDU (der Mouse) writes:
>I wrote a program that wanted to display double-size characters.  What
>I eventually did was to generate bitmaps and display them with
>XCopyPlane.  I would strongly recommend you do the same.  Actual
>displaying of the characters will probably be slower than using fonts,
>but it will almost certainly cut down drastically on the overhead and
>will actually be portable, even to X terminals and the like.

I'll try XCopyPlane.  Sounds good.  Seems any local X stuff is much faster
than the PLATO engine at the other end of the telnet socket anyway.  I
wasn't too happy with the "BDF compile" kludge, but it DOES work for the
case of local X server gabbing and proved the whole idea was at least
doable.

>...I'll likely hack on it to fix the alternate
>charset issue.  (I have a question, first; does the protocol place a
>limit on the size of an alternate character?  As I recall from my PLATO
>experience (years ago), it does, and as you imply as much in the first
>paragraph I quoted.)

An alternate character is width 8 by height 16 as defined by the
protocol.  Of course, size 2 stuff is twice as large.  Those should be
the only two sizes any PLATO emulator should have to worry about.

>
>I also notice the presence of a line-drawing mode.  Does the PLATO
>protocol specify pixelization rules, and did you make sure your X code
>follows them if so?

The protocol says nothing about aliasing or any other aspects of
line drawing.   I don't do anything special.  For what it's worth, the
graphics output has the "look and feel" of PLATO on a normal PLATO
terminal (even if it is screaming for aliasing).

Also, if you nabbed a copy in the last few days and had problems with
garbled graphics output, try nabbing a new copy (or just grab the
"xplato.c" file and rebuild).  I corrected a big/little-endian bug
that caused (at least) MIPS-based DECstations to freak.

>
>					der Mouse
>
>			old: mcgill-vision!mouse
>			new: mouse@larry.mcrcim.mcgill.edu
>
>(A copy is being sent to xpert in the hope of keeping someone else
>from making the same mistakes.  They're natural mistakes for someone
>new to X, but still mistakes.)

Thanks for the comments!
Jeff Bauer				bauer@loligo.cc.fsu.edu
FSU Computing Center Systems Group	(904) 644-2591 x. 113