KT24-1110_65E-HA-651B/include_lib/system/ui/font/font_textout.h

104 lines
1.9 KiB
C
Raw Normal View History

2024-11-10 10:44:17 +00:00
#ifndef __FONT_OUT_H__
#define __FONT_OUT_H__
#include "generic/typedef.h"
#include "font/font_all.h"
/**
* @brief
*
* @param info:
* @param language:
*
* @returns TRUE: FALSE:
*/
struct font_info *font_open(struct font_info *info, u8 language);
/**
* @brief
*
* @param info
* @param str
* @param strlen
*
* @returns
*/
u16 font_text_width(struct font_info *info, u8 *str, u16 strlen);
u16 font_textw_width(struct font_info *info, u8 *str, u16 strlen);
u16 font_textu_width(struct font_info *info, u8 *str, u16 strlen);
/**
* @brief
*
* @param info
* @param str
* @param strlen
*
* @returns
*/
u16 font_textout(struct font_info *info, u8 *str, u16 strlen, u16 x, u16 y);
/**
* @brief unicode显示接口
*
* @param info
* @param str
* @param strlen
* @param x
* @param y
*
* @returns
*/
u16 font_textout_unicode(struct font_info *info, u8 *str, u16 strlen, u16 x, u16 y);
/**
* @brief utf8显示接口
*
* @param info
* @param str
* @param strlen
* @param x
* @param y
*
* @returns
*/
u16 font_textout_utf8(struct font_info *info, u8 *str, u16 strlen, u16 x, u16 y);
/**
* @brief utf8转内码
*
* @param info
* @param utf8
* @param utf8len
* @param ansi
*
* @returns
*/
u16 font_utf8toansi(struct font_info *info, u8 *utf8, u16 utf8len, u8 *ansi);
/**
* @brief utf16转内码
*
* @param info
* @param utf
* @param len
* @param ansi
*
* @returns
*/
u16 font_utf16toansi(struct font_info *info, u8 *utf, u16 len, u8 *ansi);
/**
* @brief utf8转utf16
*
* @param info
* @param utf8
* @param utf8len
* @param utf16
*
* @returns
*/
u16 font_utf8toutf16(struct font_info *info, u8 *utf8, u16 utf8len, u16 *utf16);
/**
* @brief
*
* @param info
*/
void font_close(struct font_info *info);
#endif