nanogui: Rotated fonts on microwindows?


Previous by date: 24 Aug 2004 21:57:32 +0100 Re: Flags in GrCopyArea() and transparency, Marco Bancale
Next by date: 24 Aug 2004 21:57:32 +0100 Re: ts on ipaq and nxlib, Greg Haerr
Previous in thread: 24 Aug 2004 21:57:32 +0100 Re: Rotated fonts on microwindows?, Steven Scholz
Next in thread: 24 Aug 2004 21:57:32 +0100 Re: Rotated fonts on microwindows?, Steven Scholz

Subject: Re: [nanogui] Rotated fonts on microwindows?
From: "Greg Haerr" ####@####.####
Date: 24 Aug 2004 21:57:32 +0100
Message-Id: <0dd201c48a1c$75359620$0300a8c0@RDP>

: I bet I was talking rubbish! After using xfontsel I guess that the "R" in
: helv08R.pcf.gz has _nothing_to do with "rotated"! It probably means
"regular".

Yep, you somehow got me thinking that X fonts were available
in rotated fashion, even though I'd never seen them before...

: Well. As I understood the package "xvertext" is used "for rendering
rotated
: text in an X window". So maybe we can include some functionality into the
nxlib?

The whole and original problem is that your FLTK code that
rotates fonts uses a 1bpp pixmap for copying, and that
isn't supported by Microwindows nor NXLIB.  It's a lot of
work to make it work the way the original code wants to.


:
: How else could I rotated a text? I could create a pixmap, draw my string
in
: it, create another pixmap and then rotate the string by copying pixel by
: pixel. And finally somehow display the later pixmap. Problem here seems to
: be that the pixmap has to have the same colordepth as the underlying
: hardware. So I might have to copy 1bpp font data into a 16bpp pixmap...
:-(
: Is that right?

No, it isn't that difficult, but you'll have to stay with the Xlib
functions that are implemented correctly in NXLIB.  Basically,
its almost the exact same code as the FLTK stuff, but you'll
request a pixmap with the same depth as that of your
hardware.  Then, when you read it, you'll just compare
BLACK vs WHITE in your hardware RGB format.  Since
it's either BLACK (all 0's usually), or not, it's fairly easy
to do.  Then, you rewrite the pixmap in rotated fashion,
where XCopyArea is used to output for display.

The alternative is just to pre-rotate the .bdf font and draw
each character using your own vertical spacing.


Regards,

Greg


:
: Maybe we could realy include some simple functions from "xvertext" into
: nano-X and nxlib. It is probably easier to implement it in nano-X
directly,
: since somehow your nano-X font engine already handles different color
depths...
:
: --
: Steven
:
: ---------------------------------------------------------------------
: To unsubscribe, e-mail: ####@####.####
: For additional commands, e-mail: ####@####.####
:
:


Previous by date: 24 Aug 2004 21:57:32 +0100 Re: Flags in GrCopyArea() and transparency, Marco Bancale
Next by date: 24 Aug 2004 21:57:32 +0100 Re: ts on ipaq and nxlib, Greg Haerr
Previous in thread: 24 Aug 2004 21:57:32 +0100 Re: Rotated fonts on microwindows?, Steven Scholz
Next in thread: 24 Aug 2004 21:57:32 +0100 Re: Rotated fonts on microwindows?, Steven Scholz


Powered by ezmlm-browse 0.20.