Date: Fri, 20 Aug 2004 19:34:49 +0200 From: Steven Scholz Subject: Re: [nanogui] Rotated fonts on microwindows? Greg Haerr wrote: > : I recon helvR08.pcf.gz is a rotated font file - cause of the "R". > : > : Are rotated fonts supposed to work? > > Well, Microwindows will just output the bitmap of the > .pcf file in non-rotated format, as it doesn't know anything > about whether the font is rotated. I don't think X does > either... there's no Xlib API for rotation that I know of. > However, the font should still appear, with the character > bitmaps readable, thought. I am using some code // Rotated text drawing with X. // Original code: // Copyright (c) 1992 Alan Richardson (mppa3@uk.ac.sussex.syma) */ // // Modifications for fltk: // Copyright (c) 1997 Bill Spitzak (spitzak@d2.com) // Modifications are to draw using the current fl_font. All fonts // used are cached in local structures. This can get real expensive, // use " to rotate fonts in FLTK. This works on my PC with X. I am not sure which fonts, it uses though. It contains the lines /* create the depth 1 canvas bitmap ... */ canvas = XCreatePixmap(dpy, root, boxlen, boxlen, 1); /* create a GC ... */ font_gc = XCreateGC(dpy, canvas, 0, 0); XSetBackground(dpy, font_gc, off); 1bpp for fonts should be ok? I attach them if you don't mind... ;-) -- Steven filename="Rotated.H" filename="Rotated.C"