Hi,
I want to overlay some chinese chars (maybe include some english chars) to show meeting name on video. I research the example in dvsdk_2_00_00_22 dir and add some codes into my project. as follows:
#include <ti/sdo/simplewidget/Font.h> #include <ti/sdo/simplewidget/Text.h> static Font_Handle hFont = NULL; SkChar szSrc[50] = {0x11, 0x62, 0x84, 0x76, 0x5e, 0x79};//char "bv^y" szSrc[49] = '\0'; #define FONT_NAME "data/fonts/GB2312.ttf" if (NULL == hFont) { hFont = Font_create(FONT_NAME); if (hFont == NULL) { MCV_LOG_ERR("Failed to crate font %s", FONT_NAME); } } if (NULL != hFont) { if (Text_show(hFont, szSrc, 20, 300, 300, hDispBuf) < 0) { MCV_LOG_DBG("DisplayRun(): Text_show fail!"); } strcpy(szSrc, "sss中文ggg"); if (Text_show(hFont, szSrc, 50, 500, 500, hDispBuf) < 0) { MCV_LOG_DBG("DisplayRun(): Text_show fail!"); } }
the english chars "bv^y", ''sss '' and ''ggg" can display on video but chinese "中文" can't be displayed.
Between chars ''sss '' and ''ggg" is some space.
"GB2312.ttf" is a chinese font library.
I can't use OSD module to display chinese chars on video, because of the memory is not enough.
Pls tell me how to show chinese chars on video not using OSD module.
Thanks