nanogui: Builtin fonts
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