nanogui: Builtin fonts
Subject:
Re: [nanogui] Builtin fonts
From:
Junior ####@####.####
Date:
11 Jun 2007 04:05:21 +0100
Message-Id: <9A94A9C7C8E.0000037Fejr@inbox.com>
> -----Original Message-----
> From: ####@####.####
> Sent: Sun, 10 Jun 2007 12:01:00 -0600
> To: ####@####.#### ####@####.####
> Subject: Re: [nanogui] Builtin fonts
>
>> 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.
Hi Greg,
Thanks for your response. I think that's propably the best way to go (if
the type 1 lib does a good job) as I don't think the freetype2 renderer
is doing a good job with the specified background color. For some reason
it's not drawing the background color.
I haven't heard much about the t1lib but I guess it's still being used. Is it?
Thanks.
--Jr.