Path: utzoo!attcan!uunet!ogicse!mintaka!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: How to Get 90 degree Rotated Fonts? Message-ID: <9010060340.AA04299@Larry.McRCIM.McGill.EDU> Date: 6 Oct 90 03:40:36 GMT Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 31 > How would one get a font rotated +/-90 degrees in X so that I can > draw text running vertically? In general, one doesn't. > The solution should be a run-time one. The user specifies a given > font for an application and I wish to use that font for horz and vert > text. I can't and don't want to define a new font. Then your only choice, as far as I can see, is to draw the text horizontally into a bitmap (or pixmap), suck it over into the client with XGetImage, rotate it "by hand", send it back, and blit it onto the screen as graphics. If the rotated text is highly variable, you may want to do this for each character, though then displaying the text will be slower - many blits instead of one. (I used this technique in my terminal emulator when I want double height and/or width text: grab the character's bitmap, magnify it myself, send it back, and blit it onto the screen. Of course, if you do this much you should cache the rotated bitmaps....) There are various extensions around that can save you the trouble - for example, any of the various PostScript support extensions present in various (proprietary) servers would have no trouble. But using one of those loses compatibility with all the servers out there. that don't support that particular extension. (Sure as you do, you'll find you want to make it run on an X terminal or something.) der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu