Close
0%
0%

Create Colored BMP Fonts for Arduino

How to create Colored Fonts for Arduino / TFT

Similar projects worth following
208 views
0 comments
0 followers
likes
Download Letter Bitmap and crop all Letters to Files (Very Fast). Then convert Files to BMP and use any/my Tool to make Bytearray as constant or Image.bin for Spiff.

The "P#" ordered Files are Ready for "RA8875.exe" to create Image for Flash Chip.
RGB24: ILI9488 (18bit)
RGB565: ILI9341, RA8875
RGB8: RA8875 etc.

Under Files you can find my tool to convert Bitmaps to chararray or Image.bin as RGB24,RGB565,RGB8 and under last Instruction how it works.


Code:

int x=0; int y=0; int width=90; int height=100;
String text="HELLO"

int length = text.length();
for (int l = 0; l < length; l++)
{
tft.setWindow(x+(l*width), y, x+(l*width) + width - 1, y + height - 1);

uint32_t charpos = (text.charAt(l) - (int)61) * width * height * 3);

byte *startbyte= binarray+charpos; 
vspi->writeBytes((uint8_t*)startbyte, width * height * 3); 
}

TFT-Tool.jar

Place Tool in Picture Folder with named Pictures "P#Number.bmp" and select Output Format.

Java Archive - 48.88 kB - 01/11/2019 at 18:20

Download

  • 1
    Download Picture

    Download any Picture with Letters from FreePik.com

  • 2
    Gimp:Crop Letters as Picture

     For every Letter:

    1. Cut the Letter with Rect Select Tool

    2. Copy Selected Area (Ctrl +C)

    3. Paste as new Picture (Shift+Ctrl+V)

    4. Image-> Crop To Content (You can add a shortcut in Preferences->Surface->Shortcuts, as Example Ctrl+Shift+B)

    5. Save as Example "A.xcf" (Ctrl+S)

  • 3
    Gimp: Install Davids Batch Processor Plugin

    1 Input: Add all XCF Files

    2 Output as BMP

View all 7 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates