Author Topic: STM32 custom fonts  (Read 1834 times)

0 Members and 1 Guest are viewing this topic.

Offline strawberryTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: lv
STM32 custom fonts
« on: January 31, 2021, 10:56:24 pm »
adafruit LCD text font library is made to work on STM32 but hard fault crashes happen now and then...

Is something dedicated for STM32?

How pointers and arrays work?

Is it possible to store fonts or other data in RAM?
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2332
  • Country: 00
Re: STM32 custom fonts
« Reply #1 on: February 01, 2021, 02:43:18 am »
" Is it possible to store fonts or other data in RAM? "

It's  possible but is a very bad idea, power off no more font s there
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: STM32 custom fonts
« Reply #2 on: February 01, 2021, 10:07:54 am »
I've reworked an Adafruit fork for the ILI9341, which can use truetype fonts on STM32. It's plain C code, no arduino-like mess.
If you you're interested, I can share you the code
 

Offline strawberryTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: lv
Re: STM32 custom fonts
« Reply #3 on: February 01, 2021, 11:45:33 am »
I've reworked an Adafruit fork for the ILI9341, which can use truetype fonts on STM32. It's plain C code, no arduino-like mess.
If you you're interested, I can share you the code
I remove PROGMEM
I think, this code cause errors
Code: [Select]
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
#define pgm_read_word(addr) (*(const unsigned long *)(addr))
#define pgm_read_pointer(addr) ((const unsigned long *)pgm_read_word(addr))

uint8_t  w  = pgm_read_byte(&glyph->width),
« Last Edit: February 01, 2021, 12:05:14 pm by strawberry »
 

Offline morten.dynamite

  • Newbie
  • Posts: 1
  • Country: se
Re: STM32 custom fonts
« Reply #4 on: June 07, 2022, 02:51:24 pm »
I'm interested in the if you want to share it with me  :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf