nanogui: Builtin fonts


Previous by date: 10 Jun 2007 19:02:44 +0100 Re: Requirements for NanoX, Greg Haerr
Next by date: 10 Jun 2007 19:02:44 +0100 Building my own examples, Edward King
Previous in thread: 10 Jun 2007 19:02:44 +0100 Builtin fonts, Junior
Next in thread: 10 Jun 2007 19:02:44 +0100 Re: Builtin fonts, Junior

Subject: Re: [nanogui] Builtin fonts
From: "Greg Haerr" ####@####.####
Date: 10 Jun 2007 19:02:44 +0100
Message-Id: <189e01c7ab89$6ce75e40$6401a8c0@winXP>

> How does compile in fonts work?

A conversion utility, convbdf, is used to create a .c file
from the bitmap specifications.  This .c file is then added
to drivers/genfonts.c and drivers/Makefile.  The font
can then be accessed by number, as the System
font is (see include/mwtypes.h for the #defines).


> Can I compile in a ttf?

Not for variable sized fonts.  If you convert it to .bdf, then
you could use a single size.  (Or convert several, named
differently)


> What about fonts that are opaque with well defined background and
foreground colors?

All builtin fonts in microwindows are b/w bitmap only - meaning that
they are 1bpp.  The background and foreground colors are specified
using the GrSetGC calls before drawing text.  A font can be drawn
foreground only if desired using another SetGC call.  Otherwise,
the background rectangle is filled before drawing the text.

Regards,

Greg



Previous by date: 10 Jun 2007 19:02:44 +0100 Re: Requirements for NanoX, Greg Haerr
Next by date: 10 Jun 2007 19:02:44 +0100 Building my own examples, Edward King
Previous in thread: 10 Jun 2007 19:02:44 +0100 Builtin fonts, Junior
Next in thread: 10 Jun 2007 19:02:44 +0100 Re: Builtin fonts, Junior


Powered by ezmlm-browse 0.20.