Searching \ for '[EE]: LCD Fonts' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/lcds.htm?key=lcd
Search entire site for: 'LCD Fonts'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: LCD Fonts'
2007\04\01@155723 by Scott Dattalo

face
flavicon
face

I'm looking for a 5X7, 4-bit gray scale font for an LCD (actually it's for
an OSRAM OLED 128X64 display). I tried google but was unable to find what
I wanted. Does anyone have any suggestions?

Scott

2007\04\01@164553 by Hans Ruopp

flavicon
face
Scott Dattalo wrote:
> I'm looking for a 5X7, 4-bit gray scale font for an LCD (actually it's for
> an OSRAM OLED 128X64 display). I tried google but was unable to find what
> I wanted. Does anyone have any suggestions?
>
> Scott
>  
Hi Scott,

It's not exactly what you're looking for but it's an example for an OLED
96x64 pixels. The code is in CCS C.

Just follow the link: http://www.techdesign.be/projects/043/043.htm

Hope this helps.

Regards,


Hans

2007\04\01@232108 by Scott Dattalo

face
flavicon
face
On Sun, 2007-04-01 at 22:45 +0200, Hans Ruopp wrote:

> It's not exactly what you're looking for but it's an example for an OLED
> 96x64 pixels. The code is in CCS C.
>
> Just follow the link: http://www.techdesign.be/projects/043/043.htm

Hi Hans,

I already have written the code to display text. I also have code to
display bitmaps, draw points, draw lines, and few other graphical things.
However, since this display has a 4-bit depth, I'd like to use it for my
font. My current font is a 5X7 by 1-bit deep, like the font you see in on
the Hitachi style LCD text displays (and I believe this is the font you
use too).

I think the METAFONT utility pk2bm may be able to do what I want, but I
can't figure out how to use it. Supposedly, pk2bm will convert a font into
a bitmap. I have another utility for converting bitmaps into PIC assembly
db statements.

BTW, I've written a gpsim plugin for this display. Here's a sample screen
shot illustrating a couple of bitmaps, a rectangular gradient, and the 5X7
font:

http://www.dattalo.com/lcd1.png

Scott

2007\04\02@130741 by Hans Ruopp

flavicon
face
Hi Hans,
{Quote hidden}

I've found a quite interesting application note from Freescale
(http://www.freescale.com) about using OLED displays (AN3415.pdf for the files
AN3415SW.zip). To find the Application Note in Freescale site, click in
Documentation under "Get Support" (right-side) the application note.
Sort in descending order by date, it's a quite new AN dated 3/8/2007.

It talks about "OLED Driver Demonstration for 4 bits per pixel Displays"
but as I've already learned, that in fact it converts windows bitmap
fonts in a 1 bit deep and the 4-bit part uses the brightness settings
(Thanks for the explanation Scott).

Anyway it could interest anyone that wants to learn a little bit more
about these LCDs.

Regards



Hans

2007\04\02@141520 by Tamas Rudnai

face picon face
Also you can create your own characters:
http://techref.massmind.org/techref/io/lcd/gfxcalc.htm

Tamas


On 4/2/07, Hans Ruopp <spam_OUThruoppTakeThisOuTspambluewin.ch> wrote:
{Quote hidden}

> -

2007\04\02@164352 by Peter P.

picon face
Scott Dattalo <scott <at> dattalo.com> writes:

I am not sure how you want to use the 4-bit grayscale depth available for fonts.
If you want to render something anti-aliased you can use ghostscript to render
text (piece by piece, or the whole alphabet) as pbm (set output device). Take a
look at the font2c utility and gv options for clues. You can render any PS page
(including one custom made by a script to contain just one character at a
well-defined position) to pgm format (which is what I suppose you want, to get
at the 'gray' parts of the antialiased output. Recoding pgm as C initialized
data is extremely easy. I have never used antialiasing with pgm output but it
should work.

hope this helps,
Peter P.





2007\04\02@173116 by Scott Dattalo

face
flavicon
face
Hans Ruopp wrote:
> I've found a quite interesting application note from Freescale
> (http://www.freescale.com) about using OLED displays (AN3415.pdf for the files
> AN3415SW.zip). To find the Application Note in Freescale site, click in
> Documentation under "Get Support" (right-side) the application note.
> Sort in descending order by date, it's a quite new AN dated 3/8/2007.
>  

Anybody wishing to use the OSRAM Pictivia displays should definitely
check this appnote out.

> It talks about "OLED Driver Demonstration for 4 bits per pixel Displays"
> but as I've already learned, that in fact it converts windows bitmap
> fonts in a 1 bit deep and the 4-bit part uses the brightness settings
> (Thanks for the explanation Scott).
>  

Yep. And as I told Hans, this is not exactly what I'm looking for.
Instead, I want a 4-bit/per pixel font. In an earlier message I
mentioned something about the TeX/METAFONT tool pk2bm. Well, I played
around some more. Here's what I wrote to Hans:

I did play around with some of the METAFONT utilities used by TeX.
Here's what I have found.

You can take a TeX font file and convert it into a "generic font" file
by using the METAFONT program. For example, I have hundreds and hundreds
of TeX fonts on my PC. Here's how I convert the TeX font ascii.mf into a
generic font:

mf "\mode=localfont; scrollmode; input ascii"

This creates a file named ascii.600gf .

The next step is to create a "packed font" file using the TeX utility
gftopk:

gftopk ascii.600pk

Finally, there's a utility for converting pack font files into bitmaps,
pk2bm. For example, to extract the bitmap of the letter A, you can run:

pk2bm -b -cA ascii.600pk

This produces

........................................****************
.......................................*****************
.......................................*****************
......................................******************
.....................................*******************
.....................................*******************
....................................********************
...................................*********************
...................................*********************
..................................**********************
..................................**********************
.................................***********************
................................************************
................................************************
...............................*************************
...............................*************************
..............................**************************
.............................***************************
.............................***************************
............................****************************
...........................*****************************
...........................*****************************
..........................******************************
..........................******************************
.........................*******************************
........................********************************
........................********************************
.......................*********************************
.......................****************.****************
......................*****************.****************
.....................*****************..****************
.....................*****************..****************
....................*****************...****************
...................*****************....****************
...................*****************....****************
..................*****************.....****************
..................*****************.....****************
.................*****************......****************
................******************......****************
................*****************.......****************
...............*****************........****************
...............*****************........****************
..............*****************.........****************
.............******************.........****************
.............*****************..........****************
............******************..........****************
...........******************...........****************
...........*********************************************
..........**********************************************
..........**********************************************
.........***********************************************
........************************************************
........************************************************
.......*************************************************
.......*************************************************
......**************************************************
.....******************.................****************
.....******************.................****************
....******************..................****************
...*******************..................****************
...******************...................****************
..******************....................****************
..******************....................****************
.******************.....................****************
*******************.....................****************

I have utilities for converting bitmaps into PIC include files. I'll
have to change them some what for doing compression. For example, this
bitmap is 64X64 X 1-bit deep. I need something more like 8X8 X 4-bits
deep. I think I'm going to try to configure those to automagically
create PIC font include files.


Scott

2007\04\02@180747 by James Newton, Host

face picon face
> I'm looking for a 5X7, 4-bit gray scale font for an LCD
> (actually it's for an OSRAM OLED 128X64 display). I tried
> google but was unable to find what I wanted. Does anyone have
> any suggestions?
>
> Scott


I would find a standard font (like Ariel or the GPL equivalent) and render
all the characters to a black and white bit map at 4 times the desired
resolution (20x28 in this case) then convert to 4-bit gray scale and reduce
by resampleing to one quarter the original size. That gets you meaningful
gray scale values. Actually, you can just create a 4 bit gray scale image
and type onto that with most graphics programs.

Now, just cut out each character and read out the pixel values to translate
into table data. It may be that Niks program at
www.piclist.com/techref/datafile/charset/extractor/charset_extractor.
htm will do that for you, I don't remember if it manages 4bpp source images.

Do please let us know what you end up with?

---
James Newton: PICList webmaster/Admin
.....jamesnewtonKILLspamspam@spam@piclist.com  1-619-652-0593 phone
http://www.piclist.com/member/JMN-EFP-786
PIC/PICList FAQ: http://www.piclist.com


2007\04\02@182324 by Mark Rages

face picon face
On 4/2/07, James Newton, Host <jamesnewtonspamKILLspampiclist.com> wrote:
>
> I would find a standard font (like Ariel or the GPL equivalent) and render
> all the characters to a black and white bit map at 4 times the desired
> resolution (20x28 in this case) then convert to 4-bit gray scale and reduce
> by resampleing to one quarter the original size. That gets you meaningful
> gray scale values. Actually, you can just create a 4 bit gray scale image
> and type onto that with most graphics programs.
>

How about, just generating a plain-ole 8-bit greyscale antialiased
text in the desired resolution, then throwing away the low nibble?  If
you resample with a general-purpose lowpass filter, you may get
sub-optimal anti-aliasing results (muddy / high frequencies
attenuated).

There are all kinds of software packages to render text as bitmaps.
Personally, I would use Python and the Python Imaging Library, and
have it write out the C include file directly.

But Scott is cleverer than me, so maybe I'm missing the point of his question.

ps. There are some nice pixel fonts at minifonts.com and some free
ones at http://websitetips.com/fonts/pixel.

Regards,
Mark
markrages@gmail
--
Most of the time,
for most of the world,
no matter how hard people work at it,
nothing of any significance happens.
    -- Weinberg's Law

2007\04\03@115548 by Scott Dattalo

face
flavicon
face
James Newton, Host wrote:
> I would find a standard font (like Ariel or the GPL equivalent) and render
> all the characters to a black and white bit map at 4 times the desired
> resolution (20x28 in this case) then convert to 4-bit gray scale and reduce
> by resampleing to one quarter the original size. That gets you meaningful
> gray scale values. Actually, you can just create a 4 bit gray scale image
> and type onto that with most graphics programs.
>  

That's sort of the approach I planned to take. The "rendering" part is
the challenge. I thought the TeX/METAFONT approach would be the most
versatile, however I still haven't figured out how to render a font to a
particular size. In the approach you suggest, I think you want to render
the characters to a 1-bit depth but at twice the desired resolution,
instead of 4 times. The total number of bits for the character is 5*7*4=
140 = 10*14*1. At 4 times, the total number is 20*28*1 = 560.

Mark's suggestion of starting with an 8-bit deep font and keeping the
upper nibble may work. However, I still need to figure out how to render
to the font to the right size.

Peter's suggestion of using gv and PostScript  looks promising. I'll
investigate this next.

Scott

2007\04\03@182109 by Daniel Serpell

picon face
part 1 1193 bytes content-type:text/plain; charset=ISO-8859-1; format=flowed (decoded 7bit)

Hi!

On 4/3/07, Scott Dattalo <.....scottKILLspamspam.....dattalo.com> wrote:
>
> That's sort of the approach I planned to take. The "rendering" part is
> the challenge. I thought the TeX/METAFONT approach would be the most
> versatile, however I still haven't figured out how to render a font to a
> particular size.

I would suggest using The Gimp to render the fonts to a properly sized image,
saving it as a C file (it's in the export image formats). Then, this can be
processed easily.

You can experiment with the hinting options and select different fonts.
Also, you can alter individual characters by hand before the export.

> In the approach you suggest, I think you want to render
> the characters to a 1-bit depth but at twice the desired resolution,
> instead of 4 times. The total number of bits for the character is 5*7*4=
> 140 = 10*14*1. At 4 times, the total number is 20*28*1 = 560.

Without hinting, the result will not be good, specially at such low resolutions.

I tried with the font "Andale Mono", you can see the result here
(characters cells are 6x8 pixels, each character is smaller).

   Daniel.


part 2 1811 bytes content-type:image/png; name=minifont.png (decode)


part 3 35 bytes content-type:text/plain; charset="us-ascii"
(decoded 7bit)

2007\04\03@223913 by James Newton, Host

face picon face
> That's sort of the approach I planned to take. The
> "rendering" part is the challenge. I thought the TeX/METAFONT

There are any number of programs in Windows that will do it. Paint for
example. I personally like a little program called Graphics Gale which is
make by someone in Hong Kong and sells for less than $20. It has got to be
the quickest, most capable graphics editor ever. The guy really thought
about how to allow the user to change the function of the tool quickly and
without constantly going back to the menus or pallets.

For Linux, I believe Image Magic will do what you need, but I don't have a
lot of experience with it. And it isn't spelled Magic... Let me see: Ahh.
It's
http://www.imagemagick.org  As google knows.

Just to be sure I understand, are you trying to change the font size on the
fly in your target device? Or just getting the size set prior to loading it
into the target is causing the issues?

---
James Newton: PICList webmaster/Admin
EraseMEjamesnewtonspam_OUTspamTakeThisOuTpiclist.com  1-619-652-0593 phone
http://www.piclist.com/member/JMN-EFP-786
PIC/PICList FAQ: http://www.piclist.com


2007\04\04@013856 by Scott Dattalo

face
flavicon
face
On Tue, 2007-04-03 at 18:12 -0400, Daniel Serpell wrote:

> I would suggest using The Gimp to render the fonts to a properly sized
image,
> saving it as a C file (it's in the export image formats). Then, this can be
> processed easily.

You're right! This far easier than using the TeX approach. You can also
export the image to an XBM or XPM which for me are easy to process too.

I played around with this for a while and the thing that really jumps out
is that the typical fonts do not scale down well.

> I tried with the font "Andale Mono", you can see the result here
> (characters cells are 6x8 pixels, each character is smaller).

The "Andale Mono" looks decent. It looks better than the other mono fonts
I have installed (I don't have Andale).

I'm going to continue to experiment some more to see if there's a better
combination. The proof in the pudding is how it looks on a real LCD. It'll
be a while before I have the hardware.

BTW James, your ImageMagic suggestion is very similar to gimp.

Scott

2007\04\05@025049 by Scott Dattalo

face
flavicon
face
On Tue, 2007-04-03 at 22:38 -0700, Scott Dattalo wrote:

> I'm going to continue to experiment some more to see if there's a better
> combination. The proof in the pudding is how it looks on a real LCD. It'll
> be a while before I have the hardware.

http://www.dattalo.com/lcd2.png

This contains a screen shot of an anti-aliased font for the numbers 0-9.
(There are bitmaps and other junk on the screen too). This is not the most
esthetically pleasing (in my opinion), but I've got most of the tedious
part of converting from a generic PC-based font to  4-bit gray scale LCD
font. You can compare this font to the 5x7 1-bit font at the bottom. This
screen shot is from my simulator.

In the example, I followed Daniel's suggestion and used gimp to create the
graphical image. In this case, I simply used a Courier 10 Pitch font. I
exported the image to XPM and wrote a utility to convert from XPM to a PIC
include file. I haven't broken the string into a font yet (so it's still
one big xpm).

The next step I'll take is to convert the big XPM into a font. After, that
I plan to refine the conversion process so everything is automatic (there
are some manual steps I left out in the description above).

Scott

2007\04\05@113022 by Daniel Serpell

picon face
Hi!

On 4/5/07, Scott Dattalo <scottspamspam_OUTdattalo.com> wrote:
>
> http://www.dattalo.com/lcd2.png
>
> This contains a screen shot of an anti-aliased font for the numbers 0-9.
> (There are bitmaps and other junk on the screen too). This is not the most
> esthetically pleasing (in my opinion),
[...]

In my experience (writing apps for cell-phones and PDA's), proportional
fonts look *much* nicer than fixed size fonts at the same size. Just
think in the width of an "m" in comparison to an "i", and the height
of an "f" and "g".

Using proportional fonts is not much difficult than fixed size fonts if you
already can place a character at an arbitrary location on the screen:

int putText(int x, int y, char *msg)
{
while( *msg )
{
 char advance = fontTab[*msg] & 0x0F;
 char base  = fontTab[*msg] >> 4;
 putChar(x, y+base, *msg);
 x += advance;
}
return x;
}

You can get the value of "advance" and "base" from the
font image.

   Daniel.

2007\04\05@113247 by Daniel Serpell

picon face
Replying to myself...

On 4/5/07, Daniel Serpell <@spam@daniel.serpellKILLspamspamgmail.com> wrote:
>
> int putText(int x, int y, char *msg)
> {
>  while( *msg )
>  {
>   char advance = fontTab[*msg] & 0x0F;
>   char base  = fontTab[*msg] >> 4;
>   putChar(x, y+base, *msg);

Mmm, I forgot the "msg++" here :-)

>   x += advance;
>  }
>  return x;
> }

    Daniel.

2007\04\05@123645 by M. Adam Davis

face picon face
Out of curiosity, is there are particular reason your application
requires anti-aliased fonts?  At low resolutions (anything less than
12x12) I've found that well-formed unaliased fonts are easier to read
than any aliased font I've run across yet.  You can see in your
example image that the 5 and 7 at the bottom are easier to quickly
read than the 5 and 7 in the anti-aliased series.  Although if I
resize the image (50%) then the aliasing isn't as distracting.  The
characters look better (more rounded) but still not as quick to read
as the non-aliased.

Of course, the particular conditions that the display is expected to
be viewed under may push one way or the other.  I suspect that
anti-aliasing under sunny conditions (where high contrast is
important) may perform significantly worse.  Conversely, anti-aliasing
helps when the viewer is far from the display (or the display is very
small), even if it's very low resolution.

-Adam

On 4/4/07, Scott Dattalo <KILLspamscottKILLspamspamdattalo.com> wrote:
{Quote hidden}

> -

2007\04\05@124750 by Bob Blick

face picon face

--- "M. Adam Davis" <RemoveMEstienmanTakeThisOuTspamgmail.com> wrote:

> Out of curiosity, is there are particular reason
> your application
> requires anti-aliased fonts?  At low resolutions
> (anything less than
> 12x12) I've found that well-formed unaliased fonts
> are easier to read
> than any aliased font I've run across yet.

Easier to read? How about "ooh, shiny"! Like having
transparent terminal windows...

Cheerful regards,

Bob

2007\04\05@153826 by Tamas Rudnai

face picon face
part 1 1157 bytes content-type:text/plain; charset=ISO-8859-1; format=flowed (decoded 7bit)

Un-aliased is only easier to read because if you look at the anti-aliased
font the original contrast disappears as they would like to keep the
original thickness of the font. If you would like to keep it all you can do
is to fill out corners but it also makes a bit thicker font - see my dirty
hacking on the "5X7". I think if I could find a better contrast for those
corners the whole look-a-like would be much better, just did not want to
spend too much time on it. <grin>

Tamas


On 4/5/07, Bob Blick <spamBeGonebbblickspamBeGonespamsbcglobal.net> wrote:
{Quote hidden}

> -

2007\04\05@165343 by James Newtons Massmind

face picon face
> On Tue, 2007-04-03 at 22:38 -0700, Scott Dattalo wrote:
>
> > I'm going to continue to experiment some more to see if there's a
> > better combination. The proof in the pudding is how it
> looks on a real
> > LCD. It'll be a while before I have the hardware.
>
> http://www.dattalo.com/lcd2.png
>
> This contains a screen shot of an anti-aliased font for the
> numbers 0-9.
> (There are bitmaps and other junk on the screen too). This is
> not the most esthetically pleasing (in my opinion), but I've
> got most of the tedious part of converting from a generic
> PC-based font to  4-bit gray scale LCD font. You can compare
> this font to the 5x7 1-bit font at the bottom. This screen
> shot is from my simulator.

The anti-aliasing in that gray font is not impressive, but Graphics Gale
doesn't do a better job as can be seen at:
http://www.piclist.com/images/piclist/4bitno.png

The first line is your original, then I added Ariel, Lucinda Console (my
favorite) and Lucinda Sans. Nothing to write home about.

But then I tried the same three fonts again, with bold set on. That makes a
huge difference, because the pixels have a chance to get all the way on by
the middle of each stroke. I think you can agree that the 4th one down,
Ariel Bold, is very readable.

> In the example, I followed Daniel's suggestion and used gimp
> to create the graphical image. In this case, I simply used a
> Courier 10 Pitch font. I exported the image to XPM and wrote
> a utility to convert from XPM to a PIC include file. I
> haven't broken the string into a font yet (so it's still one big xpm).

Did you check Nik's character set extractor at
www.piclist.com/techref/datafile/charset/extractor/charset_extractor.
htm to see if it could be adapted? It is open source c code so you should be
able to twist it to your will easily if it isn't already capable of
supporting the format you need.

> The next step I'll take is to convert the big XPM into a
> font. After, that I plan to refine the conversion process so
> everything is automatic (there are some manual steps I left
> out in the description above).

I would love to make that available to people as a CGI-BIN service on the
piclist.com server or just as code, if you don't mind allowing me to post
it.

---
James Newton: PICList webmaster/Admin
RemoveMEjamesnewtonspamTakeThisOuTpiclist.com  1-619-652-0593 phone
http://www.piclist.com/member/JMN-EFP-786
PIC/PICList FAQ: http://www.piclist.com


2007\04\06@012126 by Scott Dattalo

face
flavicon
face
On Thu, 2007-04-05 at 13:53 -0700, James Newtons Massmind wrote:

> But then I tried the same three fonts again, with bold set on. That makes a
> huge difference, because the pixels have a chance to get all the way on by
> the middle of each stroke. I think you can agree that the 4th one down,
> Ariel Bold, is very readable.

I agree that changing the font to bold improves the effective contrast.
Here's another screen shot:

http://www.dattalo.com/lcd3.png

Line 1 is the original (Courier mono 12). Line 2 is the same thing but
bold. Line 3 is Daniel's example. This one looks surprisingly good for
such a small size.

> Did you check Nik's character set extractor at
> www.piclist.com/techref/datafile/charset/extractor/charset_extractor.
> htm to see if it could be adapted? It is open source c code so you should
> be able to twist it to your will easily if it isn't already capable of
> supporting the format you need.

This is converting a 2-color png into a bitmap font. This is not what I
want. I wrote a utility for converting from xpm's into a font. This took
only an hour or so. But since Nikolai's office is just around the corner
from mine, maybe I'll ask him tomorrow if I remember. :).


> I would love to make that available to people as a CGI-BIN service on the
> piclist.com server or just as code, if you don't mind allowing me to post
> it.

When I'm done, there will be a command line utility similar to Nikolai's
bitmap font extractor. This code is being developed as part of a project
I'm doing on the side. It's half hobby and half professional. I don't
charge my client for this kind of stuff, and plan to make it freely
available. In some sense, I see my effort here as going towards promoting
gpsim. You're free to make use of it too. BTW, I have another utility that
extracts images from png's and converts them into PIC include files. This
sounds similar to Nikolai's utility.

Scott

2007\04\06@012947 by Scott Dattalo

face
flavicon
face
On Thu, 2007-04-05 at 09:47 -0700, Bob Blick wrote:
> --- "M. Adam Davis" <stienmanEraseMEspam.....gmail.com> wrote:
>
>> Out of curiosity, is there are particular reason
>> your application
>> requires anti-aliased fonts?  At low resolutions
>> (anything less than
>> 12x12) I've found that well-formed unaliased fonts
>> are easier to read
>> than any aliased font I've run across yet.
>
> Easier to read? How about "ooh, shiny"! Like having
> transparent terminal windows...

Exactly! My goal is to port Linux to a PIC and use E17 (if it's released
before the turn of the century) for the desktop!

But on the serious side, the goal here is purely aesthetic. Each pixel is
4-bits deep, so why not use that extra capability? I assumed someone else
had thought of this too. But either they haven't or I haven't found it
yet.

Scott

2007\04\06@013857 by William Chops Westfield

face picon face
>> is there are particular reason
>> your application requires anti-aliased fonts?

I'm also inclined to believe that anti-aliasing fonts is not
a particularly good idea unless your pixel size is significantly
smaller than the line-width used to draw the font.  ie, if you're
left with no pixels illuminated at 'full brightness', you've paid
too much contract penalty to eliminate "jaggies"...

BillW

2007\04\06@132556 by Scott Dattalo

face
flavicon
face
William Chops Westfield wrote:

> I'm also inclined to believe that anti-aliasing fonts is not
> a particularly good idea unless your pixel size is significantly
> smaller than the line-width used to draw the font.  ie, if you're
> left with no pixels illuminated at 'full brightness', you've paid
> too much contract penalty to eliminate "jaggies"...
>  

Hi Bill,

Your pessimism is as subjective as my optimism! However, there's
probably a way to objectively quantify the effects of pixelation on two
color images. I suspect the theory is not too unlike the theory
describing quantization noise introduced by A2D converters. In some
sense, there's the A2D process (pixel quantization) and the D2A process
(your interpretation of the quantized image). The intermediate
intensities introduced at the adjacent pixels is somewhat like applying
dither to an A2D converter to increase its dynamic range.

There's obviously a limit at which it makes no sense to apply
anti-aliasing techniques to compensate for pixelation. For example, if
you quantize the image area down to 1 pixel, then there's no way that
varying the intensity will recover the image!

Scott


'[EE]: LCD Fonts'
2008\05\16@090149 by alan smith
picon face
I'm now involved in a project that is going to use a 64x128 graphics module.  So I was looking thru my old emails on this, trying to understand a few things.
 
 First, unlike character modules, you really are bit mapping the display.  Granted you only write to portions so its not like you have to store off the entire screen, but essentially you have to build the graphic elements pixel by pixel, including letters and such. Correct?
 
 So I was looking for some sort of emulation program that would let you take a letter...say 'A' and vary the size and show what it would look like on the graphics module, given the resolution.
 
 Is there anything like this out there?

     

2008\05\16@103928 by John Coppens

flavicon
face
On Fri, 16 May 2008 06:01:28 -0700 (PDT)
alan smith <EraseMEmicro_eng2spamyahoo.com> wrote:

>   First, unlike character modules, you really are bit mapping the
> display.  Granted you only write to portions so its not like you have
> to store off the entire screen, but essentially you have to build the
> graphic elements pixel by pixel, including letters and such. Correct?

Most of these graphic displays have internal character tables can can be
used as text displays when in text mode. In that case you don't need an
external character table.

John

2008\05\16@111716 by Dario Greggio

face picon face
John Coppens wrote:

> Most of these graphic displays have internal character tables can can be
> used as text displays when in text mode. In that case you don't need an
> external character table.


Usually T6963-based displays do have both a text and graphic mode; while
cheaper KS-based usually don't, and have to be addresses as bitmap.

--
Ciao, Dario -- ADPM Synthesis sas -- http://www.adpm.tk

2008\05\16@112023 by Harold Hallikainen

face
flavicon
face
While not directly answering the question, I've put text on graphic LCDs
using GNU Unifont (http://en.wikipedia.org/wiki/GNU_Unifont). I wrote a
perl script that takes the unifont.hex file and generates pic24 assembly.
I draw the characters on the graphic LCD from this. I'm handling strings
in UTF-8 and displaying them correctly. However, I was not able to include
the entire unifont character set because I ran out of flash. I've started
putting it in external SPI flash.

Harold


--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

2008\05\16@113812 by Scott Dattalo

face
flavicon
face
alan smith wrote:

>   Is there anything like this out there?
>  

Hi Alan,

I don't know if there's anything out there for prototyping and/or
evaluating fonts. I did something similar to what Harold describes.
However, I used gimp to instantiate a particular font and then exported
that to XPM. Then I wrote utilities to convert from XPM to PIC assembly.
To take it one step further, I created gpsim simulation models for
128X64 graphics displays. This allowed me to rapidly evaluate the
prototype fonts.

Scott

2008\05\16@224652 by Richard Prosser

picon face
I/ve used Excell to generate fonts. Just set up an array of suitably
sized cells and place an "X" or an "8"etc.to fill in the pixel. It's
then pretty trivial to generate the numbers required for each
charecter.

Otherwise Atmels "AVR" studio  and the BASCOM IDE have sutable tools IIRC.

RP

2008/5/17 Scott Dattalo <RemoveMEscottEraseMEspamEraseMEdattalo.com>:
{Quote hidden}

> -

2008\05\16@235937 by Apptech

face
flavicon
face
> I/ve used Excell to generate fonts. Just set up an array
> of suitably
> sized cells and place an "X" or an "8"etc.to fill in the
> pixel.

Crude and effective extension of the above:

Or shade the cells with colour or fill of choice.
Control-click allows multiple cells to be turned on and off
at a time.
Control-click-drag allows areas to be selected to add to
individual cell clicking. This allows largish areas to be
highlighted in arbitrary manners.
(Hold control before starting any clicking or strange
results can occur).

When you have a goodly number of squares filled click on
"fill" button set to colour of choice and continue with next
sub-selection.
For undoing you can fill with background (default white) OR
copy a blank cell, select areas to be unfilled as above then
paste.


       R

2008\05\17@090808 by peter green

flavicon
face

> Crude and effective extension of the above:
>
> Or shade the cells with colour or fill of choice.
> Control-click allows multiple cells to be turned on and off
> at a time.
> Control-click-drag allows areas to be selected to add to
> individual cell clicking. This allows largish areas to be
> highlighted in arbitrary manners.
> (Hold control before starting any clicking or strange
> results can occur).
>
>
>  
Less crude and even more effective extention of the above: use
conditional formatting to color the cells based on what is placed in
them. Then use further formulas in the sheet to calculate the values you
need to feed into your font array/file/whatever.

Though personally I tend to preffer to knock an app up in a RAD
environment like delphi for this sort of thing.

2008\05\17@093251 by Scott Dattalo

face
flavicon
face
Apptech wrote:
>> I/ve used Excell to generate fonts. Just set up an array
>> of suitably
>> sized cells and place an "X" or an "8"etc.to fill in the
>> pixel.
>
> Crude and effective extension of the above:

I hope you guys are not serious. There are literally thousands of examples
of fonts on the web. Why create another? And if so, why not use a program
designed for editing bitmaps? There are dozens of those.

Scott

2008\05\17@094312 by peter green

flavicon
face
Scott Dattalo wrote:
> Apptech wrote:
>  
>>> I/ve used Excell to generate fonts. Just set up an array
>>> of suitably
>>> sized cells and place an "X" or an "8"etc.to fill in the
>>> pixel.
>>>      
>> Crude and effective extension of the above:
>>    
>
> I hope you guys are not serious. There are literally thousands of examples
> of fonts on the web.
And how many are there that 1: are clearly free from licensing
restrictions 2: are in the particular size and style you want. And how
hard is it to find those compared to knocking one up from scratch?
>  Why create another? And if so, why not use a program
> designed for editing bitmaps? There are dozens of those.
>
>  
There are but most suck for this kind of work.

*Few have the ability to show in multiple scales at once (you really
want to see your work at both display size and a much larger editing
size at the same time).
*Most give no help with going from the pixel pattern to constants for
your code


2008\05\17@101345 by Apptech

face
flavicon
face
> Apptech didn't wrote:

>>> I/ve used Excell to generate fonts. Just set up an array
>>> of suitably
>>> sized cells and place an "X" or an "8"etc.to fill in the
>>> pixel.

But did wrote:

>> Crude and effective extension of the above:

Scott did wrote:

> I hope you guys are not serious. There are literally
> thousands of examples
> of fonts on the web. Why create another? And if so, why
> not use a program
> designed for editing bitmaps? There are dozens of those.

I was serious to the extent that what I offered was a useful
and direct extension of what was being discussed. I've never
used Excel as a font bit mapper, but I have created patterns
for various purposes both in a spread sheet and for external
use, using the method that I described. There are almost
certainly dozens of ways to more elegantly do any of the
things that you could do that way. But as a bottom end way
of manually controlling coloured arbitrary bits on a bitmap
pattern it does work and is accessible to many.


   Russell

2008\05\17@103326 by John Coppens

flavicon
face
On Sat, 17 May 2008 14:43:07 +0100
peter green <RemoveMEplugwashspam_OUTspamKILLspamp10link.net> wrote:

> > I hope you guys are not serious. There are literally thousands of
> > examples of fonts on the web.
> And how many are there that 1: are clearly free from licensing
> restrictions 2: are in the particular size and style you want. And how
> hard is it to find those compared to knocking one up from scratch?
> >  Why create another? And if so, why not use a program
> > designed for editing bitmaps? There are dozens of those.
> >
> >  
> There are but most suck for this kind of work.
>

Check, for example, the fonts that come with DOSEMU. I noticed that the
latest version has several fonts in different shapes. The contents is
fairly straightforward, and it should take much less to write a simple
converter than to write a new editor + edit a complete font.

John

2008\05\17@110352 by Wouter van Ooijen

face picon face
> I hope you guys are not serious. There are literally thousands of examples
> of fonts on the web. Why create another? And if so, why not use a program
> designed for editing bitmaps? There are dozens of those.

Scott, do you know fonts that are realy free to use (new BSD, public
domain, etc, not (L)GPL)? I could use some for inclusion in my ARM
library (for use with graphic LCDs that don't have an internal font).

--

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu

2008\05\17@131530 by William \Chops\ Westfield

face picon face

On May 17, 2008, at 6:32 AM, Scott Dattalo wrote:
> I hope you guys are not serious. There are literally thousands of  
> examples
> of fonts on the web. Why create another?

There seem to be very few fixed-width low-resolution fonts aimed at  
QVGA and smaller screens.  And not many utilities for converting  
fancy fonts into, say, hex data for a microcontroller's assembler,  
either.

BillW

2008\05\17@221150 by Xiaofan Chen

face picon face
On Sun, May 18, 2008 at 1:13 AM, William Chops Westfield <RemoveMEwestfwTakeThisOuTspamspammac.com> wrote:
> There seem to be very few fixed-width low-resolution fonts aimed at
> QVGA and smaller screens.  And not many utilities for converting
> fancy fonts into, say, hex data for a microcontroller's assembler,
> either.

There are quite some utility to create fonts. Some
of them also convert the fonts to header file for C.
Some are not free.

Segger has emWin which is what you want and much more.
But it is quite expensive.
microcontrollershop.com/product_info.php?products_id=640
http://www.segger.com/emwin.html

This Chinese guy has a nice software called LCD Font Maker
which only cost US$ and can do exactly what you want.
http://lcdfontmaker.c51bbs.com/index.php?title=Main_Page

Atmel has the free LCD editor and LCD plug-in for AVRstudio.
http://www.atmel.com

Ramtex has the Font Editor and Graphic libraries for popular LCDs.
They have GLCD simulator as well.
They are one of the partner for Microchip's Graphic Library.
http://www.ramtex.dk/

Pocket MicroTechnics has the GLCD Font Creator and plugins
for SawFish/Proton Basic compiler and MikroElektronika
mikroBasic/Pascal/C.
http://www.pocketmt.com/

This website has a free GLCD font generator which exports
to C compilers like WinAVR and Codevision or similar.
http://www.elvand.com/index.htm

This website has free Simulator for LCDs.
http://www.geocities.com/dinceraydin/djgfxlcdsim/djgfxlcdsim.html

Google will have more.

Xiaofan

2008\05\17@233444 by Xiaofan Chen

face picon face
On Sun, May 18, 2008 at 10:11 AM, Xiaofan Chen <EraseMExiaofancspamspamspamBeGonegmail.com> wrote:
> On Sun, May 18, 2008 at 1:13 AM, William Chops Westfield <RemoveMEwestfwKILLspamspammac.com> wrote:
>> There seem to be very few fixed-width low-resolution fonts aimed at
>> QVGA and smaller screens.  And not many utilities for converting
>> fancy fonts into, say, hex data for a microcontroller's assembler,
>> either.

Actually Microchip now has a free Font/Bitma converer as well.
It is part of the graphics library download (support C30 and C32,
for PIC24/dsPIC/PIC32).
http://www.microchip.com/graphics

Readme for the utility:
Utility allows converting bitmap (BMP extension) and MS Window's
installed fonts into formats to be used with Microchip Graphics Library.

Fonts maybe a copyrighted material so please ensure that you have
the rights to use it. You may find free fonts distributed under Open
Font License (OFL) agreement. Some of the fonts distributed under
OFL may be found here:
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=OFL_fonts.

Importing fonts into application can be performed in two ways. The first
method is to identify a range of characters that you want to use and
create a font table starting from the first character up to the last
character in the range. The second method is to create a character
filter file and based on the filter create a reduced character font table.
The second method is effective in implementing multi-language applications
using only a fraction of the memory required for a full font table
implementation.
This is especially true for Asian fonts such as Chinese, Japanese and
Korean fonts.

Importing images also requires a step to convert images to BMP format if
the original format is of different type. Multiple image editors to convert
JPEG or other formats to bitmap are readily available from software vendors.
Microsoft's Paint is one example. For advanced image editing get software
like GIMP (http://www.gimp.org). It supports capability to do generate optimized
color palette for image which can reduce image size.

2008\05\18@063911 by Stephen R Phillips

picon face
Well for me I just wrote my own utilities to do said conversion and used GIMP with it. For greater than 1 bpp image fields and bitmaps I converted the image to gray scale (set the saturation to 0) then reduced the color count to 4 using the posterization tool. It does require some contrast stretching, however it does work.

Fonts are a little tricky especially if you have a fixed symbol set (IE 0-9'.''-' for example).  In this case I had to write a custom tool to generate the font data and convert it to 1bpp depth bitmap data.

When your total memory budget is 32K it can be challenging on your patience to have 2 different fonts and 15 icons in that (some rather big).

The main thing is to Keep It Simple.  If you tweak a bitmap like I did SAVE the tweaked bitmap.  Also for creating the data keep the tools and there source code with your project or it could be a problem for someone else later on.

Also LOOK up freetype http://www.freetype.org/


Stephen


     

2008\05\18@133938 by Harold Hallikainen

face
flavicon
face

> When your total memory budget is 32K it can be challenging on your
> patience to have 2 different fonts and 15 icons in that (some rather big).
>

Even with the 128kB of flash I have in the 24HJ256GP610, I don't have room
for the whole Unifont bit map. I'm adding external SPI flash to hold it (I
currently have a subset in the PIC flash). I'm just using one font, though
my code can do pixel multiplication (double size, triple size), etc. for
larger characters. I can also change foreground and background colors.

Harold



--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

More... (looser matching)
- Last day of these posts
- In 2008 , 2009 only
- Today
- New search...