nanogui: Thread: Builtin fonts


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Builtin fonts
From: Junior ####@####.####
Date: 8 Jun 2007 16:06:36 +0100
Message-Id: <7B2A45E9994.000001DCejr@inbox.com>

Hi,
How does compile in fonts work?
Can I compile in a ttf?

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

Your help will be appreciated.

Thanks.
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


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.

Subject: Re: [nanogui] Builtin fonts
From: "Greg Haerr" ####@####.####
Date: 11 Jun 2007 23:42:06 +0100
Message-Id: <1a2401c7ac79$9a3a97e0$6401a8c0@winXP>

> 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.

Make sure you've got the GC set to draw the
background color, not transparent mode.


> I haven't heard much about the t1lib but I guess it's still being used. Is
it?

I don't know whether t1lib is being used.  My suggestion is
to use .bdf fonts as builtins, converted to .fnt, or .pcf.  All
use the same source .bdf file.

Regards,

Greg

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.