I want to convert ASCII character in different fonts like Arial 8,10. Can any one suggest some free tool for same. I want to use this in st7565 series monochrome display.
And any one give table for arial 10 adcii of size 96 char.
I want to convert ASCII character in different fonts like Arial 8,10. Can any one suggest some free tool for same. I want to use this in st7565 series monochrome display.
And any one give table for arial 10 adcii of size 96 char.
When I asked google for "lcd font generator" it said:
https://www.google.de/search?q=l...
Was there really nothing among those that you could use??
(oh and I have moved this thread - "Tutorial" forum was for posting tutorials that provide guidance to others - not for asking questions)
I try many of them but most of them not generate .h file for font and they are paid.
Which ST7565 library are you using?
There are many libraries for KS0108. Several of them can be configured for ST7565.
Choose a Font Generation program that produces Fonts in the format used by your library.
Or just say which library / format you are using. Someone will post an 8-pixel and a 10-pixel Arial Font for you.
In fact, I would expect your library to provide at least one Font by default.
David.
Thanks,
I using 5X7, 8X8 8 bit font, I also try "https://github.com/dhepper/font8x8" but they are printer 90 degree vartical I don't no why (I think this is lib problem because 5X7 work fine but they are too small ). Ans as you ask I working on ST7565 in SPI mode. I also try lin on "JARED Sanson Custon font for microcontroller"they work well but most of them are too small for my application. I just need lib of arial 10 for same.
There are many Arduino libraries that support ST7565 e.g. Adafruit's ST7565, olikraus's u8glib
e.g. Codevision glcd
There are many KS0108 libraries e.g. Thiele. And many fonts designed for those libraries.
The link that you posted seems to be for a fixed 8x8 monospaced font. Arial is a proportional font.
This means that there is information about character width, height, ...
This information is handled differently by u8glib, glcd, ks0108, ...
Unless you say which library / format you are using, I have no idea what to send you.
And yes, many of the Font Generation programs are free. Likewise, many fonts are public domain too.
David.
please see this attachment. The only difference is I am using spi mode, not parallel.
Your ZIP is not a buildable program. I am not sure if it would even work on a NXP LPC2138 chip.
The functions are fairly trivial. i.e. it can only draw a 7x5 font on byte boundaries. i.e row 0, 8, 16, ...
If you want a 10-pixel high Arial font, you need a more sophisticated font rendering function.
Life is considerably easier if you prototype on an Arduino target. Then you can evaluate your ideas.
Of course, you can then port the prototype to your actual hardware.
David.
This is bitmap for 6X8 font and it work fine. I just need font size of arial10 or near.
const unsigned char font6x8[96][6] =
{
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // sp
{ 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00 }, // !
{ 0x00, 0x00, 0x07, 0x00, 0x07, 0x00 }, // "
{ 0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14 }, // #
{ 0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12 }, // $
{ 0x00, 0x62, 0x64, 0x08, 0x13, 0x23 }, // %
{ 0x00, 0x36, 0x49, 0x55, 0x22, 0x50 }, // &
{ 0x00, 0x00, 0x05, 0x03, 0x00, 0x00 }, // '
{ 0x00, 0x00, 0x1c, 0x22, 0x41, 0x00 }, // (
{ 0x00, 0x00, 0x41, 0x22, 0x1c, 0x00 }, // )
{ 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14 }, // *
{ 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08 }, // +
{ 0x00, 0x00, 0x00, 0x50, 0x30, 0x00 }, // ,
{ 0x00, 0x08, 0x08, 0x08, 0x08, 0x08 }, // -
{ 0x00, 0x00, 0x60, 0x60, 0x00, 0x00 }, // .
{ 0x00, 0x20, 0x10, 0x08, 0x04, 0x02 }, // /
{ 0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E }, // 0
{ 0x00, 0x00, 0x42, 0x7F, 0x40, 0x00 }, // 1
{ 0x00, 0x42, 0x61, 0x51, 0x49, 0x46 }, // 2
{ 0x00, 0x21, 0x41, 0x45, 0x4B, 0x31 }, // 3
{ 0x00, 0x18, 0x14, 0x12, 0x7F, 0x10 }, // 4
{ 0x00, 0x27, 0x45, 0x45, 0x45, 0x39 }, // 5
{ 0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30 }, // 6
{ 0x00, 0x01, 0x71, 0x09, 0x05, 0x03 }, // 7
{ 0x00, 0x36, 0x49, 0x49, 0x49, 0x36 }, // 8
{ 0x00, 0x06, 0x49, 0x49, 0x29, 0x1E }, // 9
{ 0x00, 0x00, 0x36, 0x36, 0x00, 0x00 }, // :
{ 0x00, 0x00, 0x56, 0x36, 0x00, 0x00 }, // ;
{ 0x00, 0x08, 0x14, 0x22, 0x41, 0x00 }, // <
{ 0x00, 0x14, 0x14, 0x14, 0x14, 0x14 }, // =
{ 0x00, 0x00, 0x41, 0x22, 0x14, 0x08 }, // >
{ 0x00, 0x02, 0x01, 0x51, 0x09, 0x06 }, // ?
{ 0x00, 0x32, 0x49, 0x59, 0x51, 0x3E }, // @
{ 0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C }, // A
{ 0x00, 0x7F, 0x49, 0x49, 0x49, 0x36 }, // B
{ 0x00, 0x3E, 0x41, 0x41, 0x41, 0x22 }, // C
{ 0x00, 0x7F, 0x41, 0x41, 0x22, 0x1C }, // D
{ 0x00, 0x7F, 0x49, 0x49, 0x49, 0x41 }, // E
{ 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01 }, // F
{ 0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A }, // G
{ 0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F }, // H
{ 0x00, 0x00, 0x41, 0x7F, 0x41, 0x00 }, // I
{ 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01 }, // J
{ 0x00, 0x7F, 0x08, 0x14, 0x22, 0x41 }, // K
{ 0x00, 0x7F, 0x40, 0x40, 0x40, 0x40 }, // L
{ 0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F }, // M
{ 0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F }, // N
{ 0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E }, // O
{ 0x00, 0x7F, 0x09, 0x09, 0x09, 0x06 }, // P
{ 0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E }, // Q
{ 0x00, 0x7F, 0x09, 0x19, 0x29, 0x46 }, // R
{ 0x00, 0x46, 0x49, 0x49, 0x49, 0x31 }, // S
{ 0x00, 0x01, 0x01, 0x7F, 0x01, 0x01 }, // T
{ 0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F }, // U
{ 0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F }, // V
{ 0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F }, // W
{ 0x00, 0x63, 0x14, 0x08, 0x14, 0x63 }, // X
{ 0x00, 0x07, 0x08, 0x70, 0x08, 0x07 }, // Y
{ 0x00, 0x61, 0x51, 0x49, 0x45, 0x43 }, // Z
{ 0x00, 0x00, 0x7F, 0x41, 0x41, 0x00 }, // [
{ 0x00, 0x04, 0x08, 0x10, 0x20, 0x40 }, // /
{ 0x00, 0x00, 0x41, 0x41, 0x7F, 0x00 }, // ]
{ 0x00, 0x04, 0x02, 0x01, 0x02, 0x04 }, // ^
{ 0x00, 0x40, 0x40, 0x40, 0x40, 0x40 }, // _
{ 0x00, 0x00, 0x01, 0x02, 0x04, 0x00 }, // '
{ 0x00, 0x20, 0x54, 0x54, 0x54, 0x78 }, // a
{ 0x00, 0x7F, 0x48, 0x44, 0x44, 0x38 }, // b
{ 0x00, 0x38, 0x44, 0x44, 0x44, 0x20 }, // c
{ 0x00, 0x38, 0x44, 0x44, 0x48, 0x7F }, // d
{ 0x00, 0x38, 0x54, 0x54, 0x54, 0x18 }, // e
{ 0x00, 0x08, 0x7E, 0x09, 0x01, 0x02 }, // f
{ 0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C }, // g
{ 0x00, 0x7F, 0x08, 0x04, 0x04, 0x78 }, // h
{ 0x00, 0x00, 0x44, 0x7D, 0x40, 0x00 }, // i
{ 0x00, 0x40, 0x80, 0x84, 0x7D, 0x00 }, // j
{ 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00 }, // k
{ 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00 }, // l
{ 0x00, 0x7C, 0x04, 0x18, 0x04, 0x78 }, // m
{ 0x00, 0x7C, 0x08, 0x04, 0x04, 0x78 }, // n
{ 0x00, 0x38, 0x44, 0x44, 0x44, 0x38 }, // o
{ 0x00, 0xFC, 0x24, 0x24, 0x24, 0x18 }, // p
{ 0x00, 0x18, 0x24, 0x24, 0x18, 0xFC }, // q
{ 0x00, 0x7C, 0x08, 0x04, 0x04, 0x08 }, // r
{ 0x00, 0x48, 0x54, 0x54, 0x54, 0x20 }, // s
{ 0x00, 0x04, 0x3F, 0x44, 0x40, 0x20 }, // t
{ 0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C }, // u
{ 0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C }, // v
{ 0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C }, // w
{ 0x00, 0x44, 0x28, 0x10, 0x28, 0x44 }, // x
{ 0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C }, // y
{ 0x00, 0x44, 0x64, 0x54, 0x4C, 0x44 }, // z
{ 0x00, 0x08, 0x36, 0x41, 0x41, 0x00 }, // {
{ 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00 }, // |
{ 0x00, 0x41, 0x41, 0x36, 0x08, 0x00 }, // }
{ 0x00, 0x02, 0x04, 0x02, 0x01, 0x02 } // ~
};
That is a monospaced font. Arial is a proportional font.
.
The ZIP that you posted does not compile for any Atmel or Microchip device.
Post a real-life project (or link to a library).
.
There is little point in posting Arial in any of the popular formats. If you do not understand fixed or proportional, you will not be able to write the necessary rendering functìon.
.
If you want Arial in monospaced form, it will look very ugly. e.g. the letter i (aye) or l (ell) will take the same width as a letter W.
If you want a 10x8 or 12x8 fixed font, there are several available. Note that bigger fonts become more noticeable to your eyes.
.
David,
http://www.eran.io/the-dot-facto...
The Dot Factory: An LCD Font and Image Generator
This is free and very useful tool for GLCD application. I hope it help other.
You mean this:
That looks like the very first hit in #2:
Some time ago I was experimenting a bit with this. and found a (Linux) drawing program which could directly export to C source code.
I think it was mtPaint, but is was quite some time ago.
I do know that Gimp can also directly save files as an in C readable array.
Gimp -> File -> Export as -> ...
Or you can upload a picture to Rinky Dink:
http://www.rinkydinkelectronics....
Or you can write your own?
It's probably not so difficult to write a (command line) program to open a uncompressed bitmap and covert it to a text file with data formatted as a C array.
This has ofcourse also been done before:
https://www.crystalfontz.com/pro...
https://github.com/crystalfontz/...
Or search a bit on github. Probably lots of source code for font generators floating around over there.
Yet another way is to draw your own by hand.
For this I made a little helper header file like this:
/* Font Art Helper.*/ #define ________ 0x00 #define _______X 0x01 #define ______X_ 0x02 #define ______XX 0x03 #define _____X__ 0x04 #define _____X_X 0x05 #define _____XX_ 0x06 // ... (Full file below).
And then you can directly manipulate pixels like:
static const int8_t PROGMEM FONT_5x8[][5] = { { _X______ , X______X , X___X__X , X__XX__X , _XX__XX_ }, // 8 bit high '3'. { __XXXX__ , __X___XX , __X_____ , XXXXX___ , __X_____ }, // 8 bit high '4'. { _X___XXX , X___X__X , X___X__X , X___X__X , _XXX___X }, // 8 bit high '5'. { _XXX_XX_ , X___X__X , X___X__X , X___X__X , _XXX____ }, // 8 bit high '6'. { ______XX , _______X , XXX____X , ___XX__X , _____XXX }, // 8 bit high '7'.
I recommend the font generator tool from mikroelektronika. It's free and quite good. The only problem I encountered so far is that I can't save anything on my PC (Win10). I have to copy/paste the results into a text editor.
https://www.mikroe.com/supportin... (at the bottom)
Another tool