nanogui: fonts in nanox
Subject:
RE: fonts in nanox
From:
Chris Ross ####@####.####
Date:
7 Dec 1999 13:15:49 -0000
Message-Id: <Pine.LNX.4.10.9912071306050.24428-100000@vortex.ukshells.co.uk>
======================================================
| Chris Ross ( Boris` ) ####@####.#### |
| http://www.darkrock.co.uk |
`----------------------------------------------------'
On Mon, 6 Dec 1999, Greg Haerr wrote:
> 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.
>
i think we should use a system similar to x.,,...? would this be okay?
> 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.
>
true - but we could have a devfileio.c which has hooks for fs io
so os's that support itcan, and those that can't, dont.
for those that can't we could compile in certain limited files.
> 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'm going to take a look at the xfs andwrite a curt down version
to link into the nanox server and microwindows - i will add support
for bitmapped fonts etc thats allready there...
>
>
>
> : 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.
>
we could make it so that when the app
requests a font the server loads it automatically, that way
the app need not know how to load and unload fonts....
> :
> : 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
>
>
will do.