Re: Rasterizing text (simple html for example) to low resosultion grahics
- From: "Jean-François Michaud" <cometaj@xxxxxxxxxxx>
- Date: 3 Jul 2006 22:50:50 -0700
Hello Dmitry,
Dmitry Ponyatov wrote:
Does anybody do rasterizing text to low resolution 320x240 (320x200) 1
bit per pixel graphics ? What resources should I see to understand how
to show text in form like Palm Weasel Reader using few-pixel-sized
raster fonts ?
You basically want create a terminal except there is no functionality
to output characters to screen. You have to create those
functionalities yourself! :).
A simple approach would be to "draw" the fonts with zero's and one's in
small buffers for all the characters you want to be able to display.
It is easier to do monofont since you don't need additional information
about the width of each character. If you use matrices of 8x8 pixels,
then "i" could look like this (this is easier in binary. Each line of
the 8x8 matrix nicely fits in a byte):
00111100
00111100
00111100
00000000
00111100
00111100
00111100
00111100
The next step is scanning the matrix and whenever a 1 is encountered,
you output a pixel on screen of the desired color. If you have 1 bit
per pixel then it is very easy though, your pixel is either on or off
so you can probably output each byte directly to your display without
having to scan anything. You have to make sure your virtual cursor
"jumps" to the correct location after every character is displayed so
that characters don't overlap.
You will probably need a line concept. A line copy and line clear will
also come in handy if you want to add scroll capabilities but don't
really care about keeping track of what "scrolls" out of sight. Clear
screen is also nice to have.
Just take a bunch of small steps, you'll get there ;-).
Regards
Jean-Francois Michaud
.
- References:
- Rasterizing text (simple html for example) to low resosultion grahics
- From: Dmitry Ponyatov
- Rasterizing text (simple html for example) to low resosultion grahics
- Prev by Date: Re: What other language besides forth and lisp?
- Next by Date: Re: How do you define a word to calculate averages?
- Previous by thread: Re: Rasterizing text (simple html for example) to low resosultion grahics
- Next by thread: Re: Rasterizing text (simple html for example) to low resosultion grahics
- Index(es):
Relevant Pages
|
Loading