Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!CAS.BITNET!lwv27 From: lwv27@CAS.BITNET (Larry W. Virden ext. 2487) Newsgroups: comp.windows.x Subject: Xterm font/character set question Message-ID: <9105231045.AA26084@cas.org> Date: 23 May 91 14:45:18 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 71 I am trying to figure out xterm's font handling. In the various docs that I have, there is a description of a series of escape sequences which supposedly switch between various character sets called G0-G3 . Are these supposed to correspond to font 1-4 ? When I run the following script (note that one line is changed from the literal character 'escape' to a '^[' for mail purposes...) I do not see what I expect - which is the current screen changing to the various fonts. Instead, when Esc(0 is issued the terminal goes into a line drawing mode of the current window font. )0, *0 and +0 as well as all other sequences in the remaining of the script go to the current alpha mode font. There DOES appear to be an escape sequence which tells xterm to go and set the current window to a specific font - Esc ] 50 ; {font name} ^G but there is a problem - there does not appear to be a sequence to SAVE OFF the current font name. Thus, once you go to a font, you cannot return to the previous without knowing where you were. This makes writing general purpose shell scripts who need to change the font for some purpose rather annoying. Anyways, anyone know what the G0-G4 stuff is SUPPOSED to do? #! /bin/ksh lst="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-| escape='^[' for i in 0 A B ; do echo "$escape(B" ; echo Testing '(' $i echo "$escape($i" echo $lst read a echo "$escape(B" ; echo Testing ')' $i echo "$escape)$i" echo $lst read a echo "$escape(B" ; echo Testing '*' $i echo "$escape*$i" echo $lst read a echo "$escape(B" ; echo Testing '+' $i echo "$escape+$i" echo $lst read a done echo "$escape(B" ; echo Done Testing echo "$escapeN" ; echo Testing N echo $lst echo "$escape(B" echo "$escapeO" ; echo Testing O echo $lst echo "$escape(B" echo "$escapen" ; echo Testing n echo $lst echo "$escape(B" echo "$escapeo" ; echo Testing o echo $lst echo "$escape(B" exit 1 -- Larry W. Virden UUCP: osu-cis!chemabs!lwv27 Same Mbox: BITNET: lwv27@cas INET: lwv27%cas.BITNET@CUNYVM.CUNY.Edu Personal: 674 Falls Place, Reynoldsburg,OH 43068-1614 America Online: lvirden