Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!vax5.cit.cornell.edu!q4kx From: q4kx@vax5.cit.cornell.edu (Joel Sumner) Newsgroups: comp.sys.apple2 Subject: Re: How to generate all characters in a font? Message-ID: <1991Jun25.083605.5712@vax5.cit.cornell.edu> Date: 25 Jun 91 12:36:05 GMT References: <15678@ccncsu.ColoState.EDU> Distribution: usa,comp Organization: CIT, Cornell University Lines: 46 In article <15678@ccncsu.ColoState.EDU>, mcgovern@handel.cs.colostate.edu (Mike McGovern) writes: > I can't figure out how to generate all the characters a font may have. > A font can have 256 characters defined minus the first 32 (which are > control characters or something) leaving 224 viewable characters. There > are 47 keys that generate characters, and each of these can be used with > either the shift, option, or shift and option keys; giving 47x4= 188 characters > plus one for the space bar. 224-189 = 35 characters that can be defined > but not generated. How do you generate those 35 characters? Thanks. Later. You forgot something. Remember that 00-31 can be created through control characters right? Now try OPTION Control. That will give you another 32 characters. I don't know where the other 3 got lost. Probably 1 more for Option-Space. In order to figure this out, some knowledge of fonts is needed... Each font has an character defined for the values 0-255. (That doesn't mean that there is a viewable character. 00 could be a blank character of width 0.) Yes, even control keys have some equivalent character. You get to the first 128 characters (0-127) by pressing combinations of Shift and Control [and a key of course]. Control- and Shift-Control- are the same though. Look on an ASCII chart to get what each letter is in ASCII. To get characters 128-255, the program has to be specially set up to recognize them (in a sense). The standard convention on the Apple IIgs is to hit OPTION and then the same Control/Shift/key combinations that were hit to produce characters 0-127. Now, not all programs do this. Take most paint programs, if you hit Option-, you get the same effect as if you had not hit option. The program has to be written to recognize it. Most word processors and any text-editor that uses TextEdit (such as Texter) will observe this convention. There is one other little thing that Apple did to make our life a little more interesting. They put in something called 'key translation' into System 5.0. This remaps keys to more 'logical' equivalents. For example, Option-Shift-8 is converted from the ASCII number of * plus 128 to some other ASCII value (I forget precisely which one) which results in a 'bullet' [dot] rather than whatever character has ASCII value of * plus 128. Sometimes it is much more of a pain than it is worth, but hey, I didn't make it up. -- Joel Sumner GENIE:JOEL.SUMNER This .sig may not be used q4kx@cornella.ccs.cornell.edu q4kx@cornella for public viewing or q4kx@vax5.cit.cornell.edu q4kx@crnlvax5 rebroadcast without the .................................................... express written consent The impedance of absolutely nothing is 377 ohms. of major league baseball.