Re: Text in Graphic Display
- From: Roger Ivie <rivie@xxxxxxxxxxxx>
- Date: Sun, 29 Apr 2007 17:50:28 GMT
On 2007-04-29, Robert Miller <rsmiller@xxxxxxxxxxxx> wrote:
I'm doing a project using Forth Inc's SwiftX on a TI MSP 430 and using an
Osram 128x64 OLED display in which I need to display graphics, text, and
numerics. Although I have flash sufficient to do dot-matrix fonts of
several sizes, I would rather use a vector based font and scale it as
needed. Before I go about re-inventing the wheel, I was wondering if there
was anyone here who has been there and done that - particularly where RAM is
limited -or could point me in the right direction.
Well, not in FORTH and not something that had to look good.
For a recent project, I took an approach similar to a segmented LED
display. I defined a small set of segments from which I could construct
characters; I think I wound up using twenty. I have a table that
provides the endpoints of each segment relative to some key location of
the character; in my case, I used the center of the character. Each
segment contains four coordinates, one pair for the start of the segment
and the other for the end. Since the character cell is small, these can
be quite small.
The character set consists of a set of bitmasks indicating which
segments are to be illuminated when the character is drawn. A character
is plotted by drawing those segments for which a bit is set in the
bitmask. Since I'm using a 32-bit processor, I have a 32-bit mask for
each character.
Simple, straightforward, but ugly. In my application, the characters
didn't have to look good.
--
roger ivie
rivie@xxxxxxxxxxxx
.
- References:
- Text in Graphic Display
- From: Robert Miller
- Text in Graphic Display
- Prev by Date: Re: colorForth ISO now available
- Next by Date: Re: Eliminating All Ambiguous Conditions
- Previous by thread: Re: Text in Graphic Display
- Next by thread: Re: Text in Graphic Display
- Index(es):
Relevant Pages
|