nanogui: fonts in nanox
Subject:
RE: fonts in nanox
From:
Greg Haerr ####@####.####
Date:
6 Dec 1999 18:23:26 -0000
Message-Id: <796896539E6CD311B0E70060083DFEFB07707A@NBA-SLAM.CenSoft.COM>
On Monday, December 06, 1999 3:15 AM, Chris Ross wrote:
: i have been playing about with nanox some more, and i have
: been thinking it would be nice to have some sort fo dynamic
: fontness. this is how i see we do it:
:
: the client requests a font
: - whether that bea wild stab in the dark or from
: a list obtained from the server....
:
: the server looks in it's font cache and say hrmm do i
: have this loaded?
: - yes, update last accessed time
: - no, load font into memory
:
Yes, this is relatively easy to do, but a couple things need to happen:
o most important, we need a standard font naming scheme. Yes,
this could be kluged into just passing the filename (without path) for the
time
being, but then there's no standard way to name fonts.
o we add another couple entry points in the screen driver interface,
LoadFont()
and UnloadFont. These routines just read a disk file in the internal format
into
an alloc'd area of the screen driver, and return.
Currently, the font is passed as a number (0-MAXFONT) that is
defined in device.h. The additional fonts would be added above these
compiled-
in numbers.
Microwindows currently doesn't depend on any operating system
support
for file i/o. So this option should likely remain a compile-time support
option, for
operating systems without file i/o or filesystems.
o you might want to make sure that we have converters for all your
favorite fonts. I used Ben Pfaff's converter for bdf files, and wrote one
for
any windows truetype of bitmapped font. These converters create in-core
font structures in C to be linked in.
: i then think it would be possible to unload fonts that
: haven' been used for a while.
Yep. I propose that the application that calls GrLoadFont also
call GrUnloadFont.
:
: if this hasn't been planned to be done anyone, i'm happy
: to start work on it.
Go ahead and take a hack at it. If you need help, let me know.
Greg