Hi all,
I’m working with the Ameba Pro2 SDK and need to generate custom fonts and bitmaps for OSD. I’ve seen references to a Font Tool and a Bitmap Generate Tool in internal notes/images, but I cannot locate these tools in the Linux SDK ( GitHub - Ameba-AIoT/ameba-rtos-pro2: Realtek Official IoT Software Development Kit for Ameba Series SoC: (Ameba Pro2) ).
Could someone provide the download link or official documentation for these tools?
Thanks in advance!
Hi @ravinder
You may find the tools for downloading here
Hi @pammyleong
Thank you, @pammyleong. I found what you provided. I’ll try it again and see how it goes. Thanks once again for your help!..
Hi @pammyleong,
Thanks again for sharing the Font & Bitmap Tool earlier.
I followed the complete procedure to generate the custom English font and bitmap for OSD.
However, when I display my test string NuraEye_@_$123 on the video stream, the output in VLC does not appear correctly — some characters look distorted or misaligned.
Expected:
NuraEye_@_$123 and in date: PM
Actual:
The text appears jumbled or not aligned properly, as seen in the image.
Could you please advise:
-
Are there any specific font conversion settings (e.g., pixel format, 1BPP/8BPP, or character spacing) required for special characters like @, _, or $?
-
i set output format 1BPP
-
Is there a sample .txt font set for reference to verify the output
-
this is my Eng.txtdata:0123456789/:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-~!@#$%^&*()_+=;"'.><,?|{}`
Thank you for your continued help!
— Ravinder
Hi @ravinder
All the alphabets and symbols should appear fully visible in the FontTool preview window without any clipping.
Some fonts have taller or wider glyphs that extend beyond the character box, which can cause parts of the characters to be cropped.
Some suggestions to prevent clipping is to adjust the font settings. You can so by navigating to “Font Setting” and configuring the following:
Font 1: MingLiU
Style: Regular
Size: 14-16
Font 2: SimSun/NSimSun
Style: Regular
Size: 16
Hi @pammyleong,
Thanks again for your help and explanation about font clipping — it was very helpful.
I noticed that in the OSD2 example, there are references to both 1BPP and ARGB4444 font files.
I wanted to ask whether the Font & Bitmap Tool can generate fonts in these formats.
If yes, could you please explain how to generate them?
Thanks again for your help
Hi @ravinder
You can refer to the Application Note point 6 (image below) to generate the contents for 1BPP and ARGB4444 font files.
- You can use fonttools to generate .bin and convert to array using osd2_generation_tool
Hi @pammyleong ,
I too have same doubts regarding font generation. The bin file generated by Font tool is 1BPP or ARGB4444 format? The OSD2Gen Tool is only converting bin file to an array representation to use in C program only.
Do you know how to change the font format(1BPP, ARGB, etc) in Font Tool output?
Hi @yugandhar
The Font Tool generates fonts in 1BPP format by default.
The ARGB4444 format is mainly meant for images, so it isn’t supported for font generation in the tool.
Hi @pammyleong ,
But in demo app, I can see font with ARGB format also. See attached screenshot. How it was generated? In 1BPP font there is no anti-aliasing effect becuse of no alpha channel and ARGB font rendering is perfect for curved characters like C, O, Q, etc. Becasue of this reason I need ARGB font, can you help me to generate ARGB font.
Hi @yugandhar
The Font Tool does not support generating fonts in ARGB format.
You can provide a bitmap (.bmp) file for each character that you want to display.
- Set the image size according to your display needs; the height should be twice the width.
- Keep the background black or transparent, and draw the character in white. Color can later be controlled in software.
- Let us know your desired output format (e.g.
ARGB4444).
The required characters to display are:
1, 2, 3, 4, 5, 6, 7, 8, 9, A, M, P, :, /, -
Please confirm if there are any additional characters that need to be included.
Once you provide these files, we’ll prepare a corresponding patch for you.
Hi @pammyleong
Thanks for the update. So, The character bitmaps will be converted to required color format(ARGB4444) using OSD2 generation tool and each charcater’s glyph data(ARGB4444 format) will be assembled as font file offline and shared with us?
If we want to try different fonts, evertytime we need to request for font data by generating bmp files as you mentioned, Ii is very difficult to do until I finalize a font file.
Can you share the format of font file currently using? I think it has a header and data section, header contains all characters info like ascii values, width, height, bmp size, bmp data offset in data section, etc. If possible please share that information or a tool which does same.