📄 font.h
字号:
/* Copyright 1996, ESS Technology, Inc. *//* SCCSID @(#)font.h 4.5 06/16/03 *//* * Font related macros */ #ifndef __FONT_H__#define __FONT_H__#ifndef TWO_FIELDS_OSD#include "lcfont.h"#else/************************************************************************ * There are two kinds of fixed size characters: single and double width characters. A double width character is made up of two single width characters. Incidentally, a single/double width character is also a single/double byte character. There is no particular reason for this; just the way it is. A single width character is represented by a single byte with values in the range ENGLISH_FONTS_START (0x1f) to 0xef, inclusive. This code range is shared by the mandatory English font (which contains special symbols like the numerals) and other single width fonts. The English font uses up to 0x7f, with all other single width fonts starting at OTHER_ONE_SPACE_FONTS_START (0x80). The variable osd_lang, when non-zero, indicates which single width font to use. Note that you can have as many single width fonts as you like, with each one of them supporting up to 128 characters. A double width character starts with a language specific header byte, in the range TWO_SPACE_FONT_HEADER (0xf0) to 0xff inclusive. The double-width header byte for Chinese, for example, is CN_HEADER (0xff). The second byte of a double width character spans the entire range from OTHER_TWO_SPACES_FONTS_START (0x01) to 0xff. Note that in this case the language specific header byte overrides osd_lang. Note that there can be at most 16 double width fonts, each supporting 255 characters. In addition to fixed size fonts, variable size fonts are also supported. Variable size fonts are somewhat harder to use. See "custom.txt" for details. The standard code currently spots 3 different fonts: - Single width English font with special symbols. - Double width Chinese font. - A smaller, variable size English font used as help messages in the setup menu. If NEWVSE_FONT is defined, an additional variable width English font is included. It is meant to replace the single width English font. However the support is not complete and hence this is for demonstration only. EXTRA_VWFONT is just a place holder to illustrate how extra variable size fonts can be added. See "custom.txt" for details. There are two other fixed width optional fonts, enabled by CHINESE_F_OSD_LANG and JAPANESE_OSD_LANG respectively. To support various Latin languages, define LATIN_OSD_LANG as well as the individual xxx_OSD_LANG. The extra characters needed is included as part of the English font. *************************************************************************/typedef enum { ENGLISH_FONTS, CHINESE_FONTS,#ifdef CHINESE_F_OSD_LANG CHINESE_FFONTS,#endif#ifdef JAPANESE_OSD_LANG JAPANESE1_FONTS, JAPANESE2_FONTS,#endif VWENGLISH_FONTS,#ifdef NEWVSE_FONT BIGVSE_FONTS,#endif#ifdef EXTRA_VWFONTS VWFRENCH_FONTS,#endif FONT_LANGUAGES} Font_ID;#ifdef NEWVSE_FONT #define BIGVSE_HEADER 0xf8#endif#ifdef LATIN_OSD_LANG#ifdef PORTUGAL_OSD_LANG#define ENGLISH_FONTS_START 0x04#else#define ENGLISH_FONTS_START 0x0d#endif#else /* No LATIN_OSD_LANG */#define ENGLISH_FONTS_START FONT_BLANK#endif#define OTHER_ONE_SPACE_FONTS_START 0x80#define OTHER_TWO_SPACES_FONTS_START 0x01#define TWO_SPACE_FONT_HEADER 0xf0#define CN_HEADER 0xff /* Standard ESS' Chinese font */#define JP_HEADER 0xfe#define ENORI_HEADER 0xfd#define ENVSF_HEADER 0xfc#define HLION_HEADER 0xfb#define HLIOFF_HEADER 0xfa#ifdef EXTRA_VWFONTS#define FRVSF_HEADER 0xf9#endif#define MIN_CONTROL_HEADER 0xf8#define MAX_CONTROL_HEADER 0xff#define ICON_START 128 #define ICON_FOLDER ICON_START+0#define ICON_WMA ICON_START+1#define ICON_SCRSAVER ICON_START+2#define ICON_EARTH256 ICON_START+3#define ICON_MP3 ICON_START+4#define ICON_JPG ICON_START+5#define ICON_DISC ICON_START+6#ifdef KARASC#define ICON_ADISC1 ICON_DISC+1#define ICON_ADISC2 ICON_DISC+2#define ICON1_END ICON_ADISC2+1#else#define ICON1_END ICON_DISC+1#endif /* KARASC */#ifdef MEMORY_DEVICE#define ICON_VCD ICON1_END#define ICON_PHOTO ICON1_END+1#define ICON_MUSIC ICON1_END+2#define ICON_VIDEO ICON1_END+3#define ICON_END ICON_VIDEO+1#else#define ICON_END ICON1_END#endif#ifdef FONT_CUTTING#define ICON_DTS ICON_START+#define ICON_DOLBY ICON_START+#define ICON_UPARROW ICON_START+#define ICON_ADISC1 ICON_START+#define ICON_ADISC2 ICON_START+#define ICON_DOOROPEN ICON_START+ #define ICON_DOORCLOSE ICON_START+#define ICON_DMC ICON_START+#define ICON_DVD ICON_START+ #define ICON_MP2 ICON_START+ #define ICON_UNKNOWN ICON_START+ #define ICON_HDISC ICON_START+ #define ICON_PLUGIN ICON_START+#define ICON_PLUGOUT ICON_START+ #define ICON_PCM ICON_START+ #define ICON_PREF ICON_START+ #define ICON_DOOR ICON_START+ #define ICON_TEXT ICON_START+#define ICON_ARROWR ICON_START+#define ICON_ARROWU ICON_START+#define ICON_ARROWD ICON_START+#define ICON_WMA ICON_START+#define ICON_SCRSAVER ICON_START+#endif FONT_CUTTING#ifdef EQUALIZER#define FONT_EQ_START 160#define FONT_EQ_DB FONT_EQ_START+0#define FONT_EQ_DB0 FONT_EQ_START+1#define FONT_EQ_DB1 FONT_EQ_START+2#define FONT_EQ_DB2 FONT_EQ_START+3#define FONT_EQ_DB3 FONT_EQ_START+4#define FONT_EQ_DB4 FONT_EQ_START+5#define FONT_EQ_DB5 FONT_EQ_START+6#define FONT_EQ_DB6 FONT_EQ_START+7#define FONT_EQ_DB7 FONT_EQ_START+8#define FONT_EQ_DB8 FONT_EQ_START+9#define FONT_EQ_DB9 FONT_EQ_START+10#define FONT_EQ_DB10 FONT_EQ_START+11#define FONT_EQ_DB11 FONT_EQ_START+12#define FONT_EQ_DB12 FONT_EQ_START+13#define FONT_EQ_MINUS FONT_EQ_START+14#define FONT_EQ_0 FONT_EQ_START+15#define FONT_EQ_1 FONT_EQ_START+16#define FONT_EQ_150 FONT_EQ_START+17#define FONT_EQ_1K FONT_EQ_START+18#define FONT_EQ_2K FONT_EQ_START+19#define FONT_EQ_400 FONT_EQ_START+20#define FONT_EQ_5K FONT_EQ_START+21#define FONT_EQ_60 FONT_EQ_START+22#define FONT_EQ_6K FONT_EQ_START+23#define FONT_EQ__ FONT_EQ_START+24#define FONT_EQ_PLUS FONT_EQ_START+25#define FONT_EQ_LEV0 FONT_EQ_START+26#define FONT_EQ_S1 FONT_EQ_START+27#define FONT_EQ_S2 FONT_EQ_START+28#define FONT_EQ_S3 FONT_EQ_START+29#define FONT_EQ_S4 FONT_EQ_START+30#define FONT_EQ_S5 FONT_EQ_START+31#define FONT_EQ_S6 FONT_EQ_START+32#define FONT_EQ_S7 FONT_EQ_START+33#define FONT_EQ_S8 FONT_EQ_START+34#define FONT_EQ_END FONT_EQ_START+35#endif/* English and some symbols */#define FONT_BLANK 0x1f#define FONT_SPACE 0x20 #define FONT_KEYLOW 0x21 #define FONT_KEYSCALE 0x22 #define FONT_HAND 0x23#define FONT_KEYCURR 0x24 #define FONT_KEYMID 0x25#define FONT_KEYHIGH 0x26 #define FONT_S_VOL 0x27#define FONT_PREV 0x28 #define FONT_NEXT 0x29#define FONT_S_MICA 0x2a#define FONT_PLUS 0x2b#define FONT_S_MICB 0x2c#define FONT_DASH 0x2d #define FONT_PERIOD 0x2e #define FONT_SLASH 0x2f #define FONT_0 0x30 #define FONT_1 0x31 #define FONT_2 0x32 #define FONT_3 0x33 #define FONT_4 0x34 #define FONT_5 0x35 #define FONT_6 0x36 #define FONT_7 0x37 #define FONT_8 0x38 #define FONT_9 0x39 #define FONT_COLON 0x3a#define FONT_CIRCLE 0x3b#define FONT_GREATER 0x3c /* 0x3c for right arrow */#define FONT_3D3C 0x3d /* not used */#define FONT_LESS 0x3e /* 0x3e for left arrow */#define FONT_QUESTION 0x3f #define FONT_3D2C 0x40 /* not used */#define FONT_A 0x41 #define FONT_B 0x42 #define FONT_C 0x43 #define FONT_D 0x44 #define FONT_E 0x45 #define FONT_F 0x46 #define FONT_G 0x47 #define FONT_H 0x48 #define FONT_I 0x49 #define FONT_J 0x4a #define FONT_K 0x4b #define FONT_L 0x4c #define FONT_M 0x4d #define FONT_N 0x4e #define FONT_O 0x4f #define FONT_P 0x50 #define FONT_Q 0x51 #define FONT_R 0x52 #define FONT_S 0x53 #define FONT_T 0x54 #define FONT_U 0x55 #define FONT_V 0x56 #define FONT_W 0x57 #define FONT_X 0x58 #define FONT_Y 0x59 #define FONT_Z 0x5a #define FONT_LL 0x5b #define FONT_SS 0x5c #define FONT_SL 0x5d #define FONT_LS 0x5e #define FONT_UNDERSCORE 0x5f#define FONT_SYB_END FONT_UNDERSCORE#ifdef FONT_CUTTING#define FONT_FACE1A #define FONT_FACE1B #define FONT_FACE2A #define FONT_FACE2B #define FONT_3D4A #define FONT_3D4B FONT_3D2B#define FONT_3D4C #define FONT_3D1A #define FONT_3D1B #define FONT_3D1C #define FONT_3D2A #define FONT_3D2B #define FONT_3D3A #define FONT_3D3B FONT_3D2B#define FONT_ANGLE1 #define FONT_ANGLE2 #define FONT_HAND1 #define FONT_HAND2 #define FONT_HLINE #define FONT_VLINE1 #define FONT_VLINE2 #define FONT_BAR1 #define FONT_BAR2 #define FONT_TVSET1 #define FONT_CELL1 #define FONT_TIMER1 #define FONT_TEXT2 #define FONT_DISC1 #define FONT_DOOR #define FONT_KEY1 #define FONT_LOCK #endif FONT_CUTTING#ifdef LATIN_OSD_LANG/* Latin characters are included as part of the English font. */#define LATIN_a "\x0d"#define LATIN_b "\x0e"#define LATIN_c "\x0f"#define LATIN_d "\x10"#define LATIN_e "\x11"#define LATIN_f "\x12"#define LATIN_g "\x13"#define LATIN_h "\x14"#define LATIN_i "\x15"#define LATIN_j "\x16"#define LATIN_k "\x17"#define FONT_A1 0x0d /*a A+`*/#define FONT_A2 0x0e /*b A+..*/#define FONT_E1 0x0f /*c E+`*/#define FONT_E3 0x10 /*d E+^*/#define FONT_E4 0x11 /*e E+'*/#define FONT_O2 0x12 /*f O+..*/#define FONT_O3 0x13 /*g O+^*/#define FONT_U2 0x14 /*h U+..*/#define FONT_EE 0x15 /*i AE*/#define FONT_A3 0x16 /*j A+o*/#define FONT_K1 0x17 /*k \015*/#ifdef PORTUGAL_OSD_LANG#define LATIN_l "\x04"#define LATIN_m "\x05"#define LATIN_n "\x06"#define LATIN_o "\x07"#define LATIN_p "\x08"#define LATIN_q "\x09"#define LATIN_r "\x0a"#define LATIN_s "\x0b"#define LATIN_t "\x0c"#define FONT_PA1 0x04 /*l A+' */#define FONT_PA2 0x05 /*m A+~ */#define FONT_PA3 0x06 /*n A+^ */#define FONT_PC 0x07 /*o C+^(^ at bottom ) */#define FONT_PE 0x08 /*p E+^*/#define FONT_PI 0x09 /*q I+'*/#define FONT_PO1 0x0a /*r O+~*/#define FONT_PO2 0x0b /*s O+'*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -