📄 emc_font.h
字号:
#ifndef __EMC_FONT_H
#define __EMC_FONT_H
#include <stdio.h>
//#include "stosd.h"
#include "osdwrap.h"
#include "stddefs.h"
typedef enum
{
IGNORE,
JLEFT,
JRIGHT,
JCENTER
};
typedef enum
{
FONT_ARIAL16_18,
FONT_BOLD,/*[WidthConst],short font*/
FONT_MYENGFONT,/*12*24 english font*/
FONT_LATIN,
FONT_MYFONT,/*[WidthVari],small font for EPG*/
#ifdef USE_CHINESE_FONT
FONT_CHINESE_S,/*Simple Chinese*/
FONT_CHINESE_T,
#endif
FONT_NUMBER
}EMCFont_Type;
typedef struct
{
char *name; // font name
U8 maxwidth; // max width in pixels
U8 height; // height in pixels
U8 ascent; // ascent (baseline) height
U8 firstchar; // first character in bitmap
U8 size; // font size in characters
U16 *bits; // 16-bit right-padded bitmap data
/*JackYao modified, 01-26-2005, RMint16 to RMint32*/
U32 *offset; // 256 offsets into bitmap data
U8 *width; // 256 character widths or 0 if fixed
} MWVFONT, *PMWVFONT;
typedef struct
{
char *name; // font name
U8 maxwidth; // max width in pixels
U8 height; // height in pixels
U8 ascent; // ascent (baseline) height
U8 firstchar; // first character in bitmap
U8 size; // font size in characters
U8 *bits; // 16-bit right-padded bitmap data
//U32 *offset; // 256 offsets into bitmap data
/*JackYao modified, 01-26-2005, RMint16 to RMint32*/
U8 bytesperchar;
// U8 *width; // 256 character widths or 0 if fixed
} MWCFONT, *PMWCFONT;
typedef struct
{
char *name; // font name
U8 maxwidth; // max width in pixels
U8 height; // height in pixels
U8 ascent; // ascent (baseline) height
U16 size; // font size in characters
U8 *bits; // 16-bit right-padded bitmap data
U8 bytesperchar;
} MWCCNFONT, *PMWCCNFONT;
/*Added by Allen,12-22-2005*/
typedef struct
{
char *name; /* font name*/
U8 maxwidth; /* max width in pixels*/
U8 height; /* height in pixels*/
U8 firstchar; /* first character in bitmap*/
U16 number; /* font number in characters*/
U8 byteperchar;/* if it is a font with vari-width,this element is 0*/
U8 *bits; /* 8-bit right-padded bitmap data*/
U32 *offset; /* 256 offsets into bitmap data*/
U8 *width; /* 256 character widths or 0 if fixed*/
}EMCFont_t,*pEMCFont_t;
#ifdef USE_CHINESE_FONT
/*from uni2big5.c*/
extern const unsigned short uni2big5[0xfffe - 0x0080 +1];
#define UNI2BIG5(x) ( ((x)>=0x80)&&((x)<0xFFFE) ? uni2big5[((U16)x&0xFFFF)- 0x0080] : 0)
#endif
void EMC_DrawTextRectangle(STOSD_RegionHandle_t Handle,
int x,int y,int width,int height,
char *text,int justification,EMCFont_Type fontType,
BOOL bTransparent,STOSD_Color_t fontcolor,STOSD_Color_t drawcolor,STOSD_Color_t fillcolor);
void EMC_DrawTSTextRectangle(STOSD_RegionHandle_t Handle,
int x,int y,int width,int height,
char *text,int justification,BOOL bTransparent,
STOSD_Color_t fontcolor,STOSD_Color_t drawcolor,STOSD_Color_t fillcolor);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -