A program for converting the Windows font to the SSD1306 font

Started by tolyan249, Sep 28, 2026, 04:17 PM

Previous topic - Next topic

tolyan249

I wrote a program to convert Windows fonts to HEX for OLED indicators , where you can select the font, size, and style, and convert all the characters to a text file; you can edit a character and save it to the file as well. You can see the character by entering HEX.  You can also display special characters by typing their code.

Maybe it will be useful to someone.

tolyan249

Here is the font displayed on WINDOWS  40.
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xF0, 0xF8, 0xF8, 0xFC, 0xFC,
  0x7E, 0x7E, 0x7E, 0x3E, 0x3F, 0x3F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x3F,
  0x3F, 0x3E, 0x7E, 0x7E, 0xFC, 0xFC, 0xFC, 0xF8, 0xF8, 0xF0, 0xE0, 0xC0, 0x80, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0xF8, 0xFC, 0xFF, 0xFF, 0x7F, 0x1F, 0x0F, 0x07, 0x03, 0x81, 0xC1, 0xE0,
  0xF0, 0xF8, 0xFC, 0xFC, 0xFC, 0x7E, 0x7E, 0x3E, 0x3E, 0x3E, 0x7E, 0x7E, 0xFC, 0xFC, 0xF8, 0xF0,
  0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x3C, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8,
  0xC0, 0x00, 0xC0, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x01, 0x00, 0x00, 0xC0, 0xF8, 0xFE, 0xFF, 0xFF, 0xFF,
  0xFF, 0x1F, 0x07, 0x01, 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF,
  0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x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 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
  0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00




tolyan249

I've added the ability to load a font file; there are many fonts available online, and you can download them and convert them to OLED.

The new font is added to the end of the font selection, where you need to select the added font and apply it.


Maybe it will come in handy for someone.

I added the conversion of the image to TFT format and back from Hex d the image.

tolyan249

I added the conversion of the image to TFT format and back from Hex d the image.

▲