font generator tool on glcd

Go To Last Post
19 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

Last Edited: Mon. Jun 19, 2017 - 08:01 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I try many of them but most of them not generate .h file for font and they are paid.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

  please see this attachment. The only difference is I am using spi mode, not parallel.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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.
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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 }    // ~

};

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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,