ST7565 Font

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mOSKit
 
Posts: 14
Joined: Wed Dec 10, 2014 4:14 pm

ST7565 Font

Post by mOSKit »

Hi, can you please tell me how to set different font and size? if style is not available than changing the size would be enough for me.
Thank you

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: ST7565 Font

Post by adafruit_support_bill »

There is no 'native' font for these displays. So it is built into the library. https://github.com/adafruit/ST7565-LCD/ ... glcdfont.c

It is an 8x5 pixel font. To change it would require some library hacking.

User avatar
mOSKit
 
Posts: 14
Joined: Wed Dec 10, 2014 4:14 pm

Re: ST7565 Font

Post by mOSKit »

So if i generate new hex file say with some font generator would that work?
Neved done such thing

User avatar
adafruit_support_bill
 
Posts: 88141
Joined: Sat Feb 07, 2009 10:11 am

Re: ST7565 Font

Post by adafruit_support_bill »

Yes. If the font generator can do 8x5 it should work with the existing code. Otherwise, you would need to hack the drawchar method:

Code: Select all

void  ST7565::drawchar(uint8_t x, uint8_t line, char c) {
  for (uint8_t i =0; i<5; i++ ) {
    st7565_buffer[x + (line*128) ] = pgm_read_byte(font+(c*5)+i);
    x++;
  }

  updateBoundingBox(x, line*8, x+5, line*8 + 8);
}

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”