Skip to main content
Notice removed Canonical answer required by CommunityBot
Bounty Ended with no winning answer by CommunityBot
Tweeted twitter.com/#!/StackUnix/status/472010066913423360
Notice added Canonical answer required by user55518
Bounty Started worth 50 reputation by CommunityBot

Bitmap Fonts 2Font data as array in C

I need to convert some X11 bitmap fonts to an array in C for a 128x64 OLED Display.

I saw some fonts like /usr/share/fonts/X11/misc/9x15-ISO8859-1.pcf.gz

The result should look like

/* Standard ASCII 6x8 font */
const char PROGMEM font6x8[] = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,// sp
  0x00, 0x00, 0x00, 0x2f, 0x00, 0x00,// !
  0x00, 0x00, 0x07, 0x00, 0x07, 0x00,// "

Are the tools for converting a pcf font to an array of chars in C? Where are good resources for bitmap fonts?

Is there anything else I have missed?

Bitmap Fonts 2 C

I need to convert some X11 bitmap fonts to C for a 128x64 OLED Display.

I saw some fonts like /usr/share/fonts/X11/misc/9x15-ISO8859-1.pcf.gz

The result should look like

/* Standard ASCII 6x8 font */
const char PROGMEM font6x8[] = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,// sp
  0x00, 0x00, 0x00, 0x2f, 0x00, 0x00,// !
  0x00, 0x00, 0x07, 0x00, 0x07, 0x00,// "

Are the tools for converting a pcf font to C? Where are good resources for bitmap fonts?

Is there anything else I have missed?

Bitmap Font data as array in C

I need to convert some X11 bitmap fonts to an array in C for a 128x64 OLED Display.

I saw some fonts like /usr/share/fonts/X11/misc/9x15-ISO8859-1.pcf.gz

The result should look like

/* Standard ASCII 6x8 font */
const char PROGMEM font6x8[] = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,// sp
  0x00, 0x00, 0x00, 0x2f, 0x00, 0x00,// !
  0x00, 0x00, 0x07, 0x00, 0x07, 0x00,// "

Are the tools for converting a pcf font to an array of chars in C? Where are good resources for bitmap fonts?

Is there anything else I have missed?

Source Link
user55518
user55518

Bitmap Fonts 2 C

I need to convert some X11 bitmap fonts to C for a 128x64 OLED Display.

I saw some fonts like /usr/share/fonts/X11/misc/9x15-ISO8859-1.pcf.gz

The result should look like

/* Standard ASCII 6x8 font */
const char PROGMEM font6x8[] = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,// sp
  0x00, 0x00, 0x00, 0x2f, 0x00, 0x00,// !
  0x00, 0x00, 0x07, 0x00, 0x07, 0x00,// "

Are the tools for converting a pcf font to C? Where are good resources for bitmap fonts?

Is there anything else I have missed?