[LispM-Hackers] YA graphics library, but this might be the one...

James A. Crippen james@UnLambda.COM
Thu, 5 Apr 2001 01:00:03 -0800 (AKDT)


I was just looking at how SDL would do text rendering.  Because games (the
primary purpose for SDL) do text in so many different ways the core
library doesn't include text rendering support, but there are a number of
different flavors of extension libraries to support various forms of text
rendering.  I looked at a couple, particularly one that does TrueType and
another that uses a novel XML-based bitmap format.

Nothing in particular looks like what we'd want, and naturally nothing
supports something so obscure as XLD bitmap format.  I didn't find
anything that supported BDF directly either.

In any case, it seems like we'll need to implement a font
library.  Thankfully most of the hard work for managing character bitmaps
has been done more than once, and it looks like we can steal good bits
from the other font rendering libraries.  We'll need to make our own
renderers for the different flavors of fonts we wish to support (I'd like
to get TrueType and Adobe Type1 supported at some point, both in Lisp and
in the display system), especially focusing on BDF and XLD (and maybe
whatever Symbolics uses as well).

I just found a graphics primitives library.  SDL doesn't provide actual
graphics primitives.  If we rip off the stuff out of this library then we
have most of the primitives needed to perform the various miscops.  The
readme for this library is ftp://esc2.zkm.de/pub/SDL_gfxPrimitives/README
This lib does a lot more than I think we want.  It says that it does
pixels, hlines, vlines, anti-aliased lines, rectangles, circles, ellipses,
polygons, and 8x8 pixmap fonts for drawing on any SDL Surface, handles
full alpha blending, hardware surface locking, and all surface depths.  We
probably only need the polygons, lines, circles, rectangles, ellipses, and
pixels.  I need to spend some quality time with the SSDN2 to read which
primitives are encoded by macroops.  Then we can use the relevant code
from this library, or at least use it as a good place to start from.

I think that the potential to have some decent graphics display working is
seeming closer and closer to reality the more I look at SDL.  It really
seems like a winner.

Anyway, I should go to bed.  My roommate notes that he's been working with
SDL for a couple of years now, particularly on the Kodak DC-290
camera.  So that's a convenient resource.

*yawn*
'james

-- 
James A. Crippen <james@unlambda.com> ,-./-.  Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us   |  |/  | USA, 61.2069 N, 149.766 W,
Y = \f.(\x.f(xx)) (\x.f(xx))         |  |\  | Earth, Sol System,
Y(F) = F(Y(F))                        \_,-_/  Milky Way.