# OSD text with black color showing black rectangles instead of characters

**URL:** <https://forum.amebaiot.com/t/osd-text-with-black-color-showing-black-rectangles-instead-of-characters/4516>\
**Category:** Multimedia\
**Tags:** rtl8735b\
**Created:** [November 12, 2025, 1:36pm UTC](https://forum.amebaiot.com/t/osd-text-with-black-color-showing-black-rectangles-instead-of-characters/4516 "2025-11-12T13:36:16Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![yugandhar](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/yugandhar/32/2836_2.png) [@yugandhar](https://forum.amebaiot.com/u/yugandhar)\
**Post date:** [November 12, 2025, 1:36pm UTC](https://forum.amebaiot.com/t/osd-text-with-black-color-showing-black-rectangles-instead-of-characters/4516/1 "2025-11-12T13:36:16Z")

</div>

Hi,

I found an issue in OSD rendering when used black color for text/date/time. Please see the images below. How to fix it?

 ![1000056818](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/2/2231064b1b4dfa6992b4e88e12043fff7aed7cba.jpeg)

 ![1000056819](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/d/dd57cdbf368500455bf183fef85988c98313c8b1.jpeg)

If anyone has solution for this problem, please help me.

Thanks,

Yugandhar

---

<div class="post-metadata">

**Author:** ![Pammy](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/pammy/32/936_2.png) [@Pammy](https://forum.amebaiot.com/u/Pammy)\
**Post date:** [November 21, 2025, 2:59am UTC](https://forum.amebaiot.com/t/osd-text-with-black-color-showing-black-rectangles-instead-of-characters/4516/2 "2025-11-21T02:59:37Z")

</div>

Hi @yugandhar

if you are using 1bpp,

 ![image](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/d/d98ba188cfe9db6ce68565303d07e8c765b367bf.png)

You can change the text color by modifying `OSD_TEXT_FONT_CH_COLOR` in font structure. The available colours can be found in [hal\_osd\_avdef.h](https://github.com/Ameba-AIoT/ameba-rtos-pro2/blob/main/component/soc/8735b/fwlib/rtl8735b/lib/source/ram/video/hal_osd_avdef.h). `OSD_TEXT_FONT_CH_COLOR` is defined in [osd\_api.h](https://github.com/Ameba-AIoT/ameba-rtos-pro2/blob/main/component/soc/8735b/fwlib/rtl8735b/lib/source/ram/video/osd/osd_api.h).

---

<div class="post-metadata">

**Author:** ![yugandhar](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/yugandhar/32/2836_2.png) [@yugandhar](https://forum.amebaiot.com/u/yugandhar)\
**Post date:** [November 21, 2025, 5:47am UTC](https://forum.amebaiot.com/t/osd-text-with-black-color-showing-black-rectangles-instead-of-characters/4516/3 "2025-11-21T05:47:59Z")

</div>

Hi @Pammy ,

The issue is with black color, when used it the displayed OSD is not readable. Your suggestion is for **How to change OSD color dynamically?**

Have you verified OSD rendering with **RGB\_Black** and getting reproted issue?

---

<div class="post-metadata">

**Author:** ![Pammy](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/pammy/32/936_2.png) [@Pammy](https://forum.amebaiot.com/u/Pammy)\
**Post date:** [November 24, 2025, 8:36am UTC](https://forum.amebaiot.com/t/osd-text-with-black-color-showing-black-rectangles-instead-of-characters/4516/4 "2025-11-24T08:36:26Z")

</div>

Hi @yugandhar

May I know how you set the text color to black? I’d like to follow the same steps to reproduce the result on my end.

When I apply **RGB\_Black** , my output looks like this: (Tried on isp\_osd\_example default example)

 ![vlcsnap-2025-11-24-16h30m57s076](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/1/1d1f488f857de08be66c55a52a7d377563e925af.jpeg)

---

<div class="post-metadata">

**Author:** ![yugandhar](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/yugandhar/32/2836_2.png) [@yugandhar](https://forum.amebaiot.com/u/yugandhar)\
**Post date:** [November 24, 2025, 9:39am UTC](https://forum.amebaiot.com/t/osd-text-with-black-color-showing-black-rectangles-instead-of-characters/4516/5 "2025-11-24T09:39:43Z")

</div>

Hi @Pammy ,

I am calling **rts\_osd\_update\_info(rts\_osd2\_type\_text, &osd\_text);** after **osd\_text.font**. **ch\_color** = **RGB\_Black;**

After this call, I am seeing the text as black rectangle blocks as provided in screenshots.

---

<div class="post-metadata">

**Author:** ![Pammy](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/pammy/32/936_2.png) [@Pammy](https://forum.amebaiot.com/u/Pammy)\
**Post date:** [November 25, 2025, 6:43am UTC](https://forum.amebaiot.com/t/osd-text-with-black-color-showing-black-rectangles-instead-of-characters/4516/6 "2025-11-25T06:43:35Z")

</div>

Hi @yugandhar,

I tried your methods on the date text.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/9/9c39cc9c036e907fbb320ade8a4e0d406989e4a1.png)

I also generated a new font using,  
**Font:** SimSun  
**Style:** Regular  
**Size:** 16

[custom\_font\_1bpp.zip](https://forum.amebaiot.com/uploads/short-url/1GroQr822PlFKYbYgfVjBz9gqgb.zip) (5.7 KB)

and this is the result i have gotten,

 ![vlcsnap-2025-11-25-14h23m04s623](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/3/34ae0b045f08fb8ad4288ae6756bbb5dd1da6ad6.jpeg)

You can use the font I generated and test again. If you generated your own fonts, you can also provide me the header file for testing.

---

<div class="post-metadata">

**Author:** ![yugandhar](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/yugandhar/32/2836_2.png) [@yugandhar](https://forum.amebaiot.com/u/yugandhar)\
**Post date:** [December 3, 2025, 12:17pm UTC](https://forum.amebaiot.com/t/osd-text-with-black-color-showing-black-rectangles-instead-of-characters/4516/7 "2025-12-03T12:17:17Z")

</div>

Hi @Pammy ,

Finally I found the root cause of **OSD black color issue**. The issue is due to **block\_alpha** value in **font** settings. **Alpha values from _0 to 3 and 12 to 15_ with black color** has reported issue. See the below captured images with black and red color.

 ![black_alpha](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/1/1abb99a3d27a23f022d1bec69538477c9f8a2f79.png)

 ![red_alpha](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/3/38596f39975a3c10b68e450c0de6d2d251f49521.png)

Actually I used alpha value **15** in my application and got the issue. Temporarily I can use **11** now to avoid the issue with black color because my app allows user to change OSD color, but it is good to fix and release new version from your side. Hope you will do it soon.

Thanks,

**Yugandhar**

---

<div class="post-metadata">

**Author:** ![yugandhar](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/yugandhar/32/2836_2.png) [@yugandhar](https://forum.amebaiot.com/u/yugandhar)\
**Post date:** [May 13, 2026, 10:30am UTC](https://forum.amebaiot.com/t/osd-text-with-black-color-showing-black-rectangles-instead-of-characters/4516/8 "2026-05-13T10:30:51Z")

</div>

Hi @Pammy ,

It looks like this issue not yet resolved, can you update me on this.

Thanks,

Yugandhar

---

<div class="post-metadata">

**Author:** ![Pammy](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/pammy/32/936_2.png) [@Pammy](https://forum.amebaiot.com/u/Pammy)\
**Post date:** [May 25, 2026, 8:54am UTC](https://forum.amebaiot.com/t/osd-text-with-black-color-showing-black-rectangles-instead-of-characters/4516/9 "2026-05-25T08:54:47Z")

</div>

Hi @yugandhar,

Can you try this patch?

[libispfeature.zip](https://forum.amebaiot.com/uploads/short-url/ll0xzlEmQ3356TbXynOIlt31f2T.zip) (377.1 KB)

We will be updating on GitHub as well.

---

<div class="post-metadata">

**Author:** ![yugandhar](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/yugandhar/32/2836_2.png) [@yugandhar](https://forum.amebaiot.com/u/yugandhar)\
**Post date:** [May 25, 2026, 1:28pm UTC](https://forum.amebaiot.com/t/osd-text-with-black-color-showing-black-rectangles-instead-of-characters/4516/10 "2026-05-25T13:28:19Z")

</div>

Hi @Pammy ,

Thanks for the update. It is working now. Could you please update on below issues also.

> [@Ameba Pro2 Font & Bitmap Tool Link / Documentation](https://forum.amebaiot.com/t/ameba-pro2-font-bitmap-tool-link-documentation/4406/29):
>
> Hi @yugandhar, The clipping happens after the PNGs are converted into the ARGB4444 font table and rendered by the OSD module. Therefore, some fine tuning is needed during the PNG-to-ARGB4444 conversion process, especially for glyph alignment and positioning, which is done in the script that I have written. osd\_char\_w , osd\_char\_h that i have tested are, 28 56 32 64 64 128 Kindly try the attached header file, which was tuned based on the image you provided. Do let me know if there’s any iss…

> [@Text OSD with 31+ characters has issues](https://forum.amebaiot.com/t/text-osd-with-31-characters-has-issues/4852):
>
> Hi, For rts\_osd2\_type\_text when the string buffer has more than 31 characters, the trailing characters are not printing sometimes and total text ignored if more than 36+ characters are available. The OSD demo provided [ameba-rtos-pro2/component/video/osd2/isp\_osd\_example.c at main · Ameba-AIoT/ameba-rtos-pro2 · GitHub](https://github.com/Ameba-AIoT/ameba-rtos-pro2/blob/main/component/video/osd2/isp_osd_example.c) has string buffer of length 64, but it is not printing properly if we keep more than 31 characters. Please provide an update with fix for this issue and also [OSD text with black …](https://forum.amebaiot.com/t/osd-text-with-black-color-showing-black-rectangles-instead-of-characters/4516/8)

Thanks,

Yugandhar

---

<div class="post-metadata">

**Author:** ![Pammy](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/pammy/32/936_2.png) [@Pammy](https://forum.amebaiot.com/u/Pammy)\
**Post date:** [May 26, 2026, 1:17am UTC](https://forum.amebaiot.com/t/osd-text-with-black-color-showing-black-rectangles-instead-of-characters/4516/11 "2026-05-26T01:17:36Z")

</div>

Hi @yugandhar ,

Yes we are looking into the issue. We will update accordingly.

Thank you.
