| 1 | /****************************************************************************** |
|---|
| 2 | |
|---|
| 3 | Copyright (c) 2004 Digital STREAM Technology Inc. All Rights Reserved |
|---|
| 4 | |
|---|
| 5 | FILE NAME |
|---|
| 6 | |
|---|
| 7 | GFN_Service.h |
|---|
| 8 | |
|---|
| 9 | VERSION |
|---|
| 10 | |
|---|
| 11 | Version 0.4 |
|---|
| 12 | |
|---|
| 13 | DESCRIPTION |
|---|
| 14 | |
|---|
| 15 | This file is for Font Manager service header in Graphics Lib. |
|---|
| 16 | |
|---|
| 17 | AUTHOR |
|---|
| 18 | |
|---|
| 19 | S/W 3 Team Jinsook Kim. |
|---|
| 20 | |
|---|
| 21 | HISTORY |
|---|
| 22 | |
|---|
| 23 | NAME DATE REMARKS |
|---|
| 24 | |
|---|
| 25 | Jong-ki Jeong 03-20-2004 Created initial version 0.01 |
|---|
| 26 | Jong-ki Jeong 03-20-2004 modify function name and ... |
|---|
| 27 | Jong-ki Jeong 05-25-2004 add GFN_UOpenPagePrint |
|---|
| 28 | add GFN_OpenPagePrint |
|---|
| 29 | add GFN_ClosePagePrint |
|---|
| 30 | add GFN_GetPageInfo |
|---|
| 31 | add GFN_PageMoveDown |
|---|
| 32 | add GFN_PageMoveUp |
|---|
| 33 | add GFN_INSIDE |
|---|
| 34 | Jinsook Kim 06-24-2004 modify GFN_Init |
|---|
| 35 | modify font_style:UINT8->SINT32 |
|---|
| 36 | add GFN_HANGUL_NORMAL type |
|---|
| 37 | Jinsook Kim 06-25-2004 Updated version : 0.01->0.1 |
|---|
| 38 | Jinsook Kim 08-18-2004 Updated version : 0.1->0.2 |
|---|
| 39 | Jong-ki Jeong 08-19-2004 GFN_FONT_ATTR ±¸Á¶Ã¼ ¸â¹ö real_center Ãß°¡ |
|---|
| 40 | Jinsook Kim 12-10-2004 GFN_FONT_ATTR ±¸Á¶Ã¼ ¸â¹ö space_ofs_x Ãß°¡ |
|---|
| 41 | Jong-ki Jeong 03-14-2005 font mode, user font °ü·Ã ±¸Á¶Ã¼ ¹× ÇÔ¼öÃß°¡ |
|---|
| 42 | Jinsook Kim 03-30-2005 Updated version : 0.2->0.3 |
|---|
| 43 | Jinsook Kim 04-21-2005 Updated version : 0.3->0.4 |
|---|
| 44 | |
|---|
| 45 | REMARK |
|---|
| 46 | |
|---|
| 47 | |
|---|
| 48 | ******************************************************************************/ |
|---|
| 49 | #ifndef GFN_FONT_H |
|---|
| 50 | #define GFN_FONT_H |
|---|
| 51 | |
|---|
| 52 | #ifdef __cplusplus |
|---|
| 53 | extern "C" { |
|---|
| 54 | #endif |
|---|
| 55 | |
|---|
| 56 | /*----------------------------------------------------------------------------- |
|---|
| 57 | * type define of variable types |
|---|
| 58 | *----------------------------------------------------------------------------*/ |
|---|
| 59 | /******* font Á¾·ù ***********************************************************/ |
|---|
| 60 | typedef enum { |
|---|
| 61 | GFN_JUNGLE_MODE =0, |
|---|
| 62 | GFN_DST_MODE =1,//ÇöÀç »ç¿ëÁß ¾Æ´Ô |
|---|
| 63 | GFN_USER_MODE =2, |
|---|
| 64 | GFN_NUM_MODE |
|---|
| 65 | }GFN_FONT_MODE; |
|---|
| 66 | |
|---|
| 67 | /******* Á¤·Ä Á¾·ù ***********************************************************/ |
|---|
| 68 | typedef enum { |
|---|
| 69 | GFN_LEFT =0, //ÁÂÃø Á¤·Ä |
|---|
| 70 | GFN_CENTER , //¿µ¿ªÀÇ Á¤Áß¾Ó |
|---|
| 71 | GFN_RIGHT , //¿ìÃø Á¤·Ä |
|---|
| 72 | GFN_CENTER_TOP , //Á¿ì center, À§ÂÊ Á¤·Ä |
|---|
| 73 | // GFN_CENTER_BOT , //Á¿ì center, ¾Æ·¡ÂÊ Á¤·Ä |
|---|
| 74 | GFN_LEFT_CENTER , //»óÇÏ center, ÁÂÃø Á¤·Ä |
|---|
| 75 | GFN_RIGHT_CENTER, //»óÇÏ center, ¿ìÃø Á¤·Ä |
|---|
| 76 | GFN_NUM_ADJUST |
|---|
| 77 | }GFN_JUSTIFY; |
|---|
| 78 | |
|---|
| 79 | /******* Font Style variables ************************************************/ |
|---|
| 80 | enum { |
|---|
| 81 | GFN_DEFALUT = 0, //(3:SANSERIFMONO_FONT) |
|---|
| 82 | GFN_SERIFMONO = 1, |
|---|
| 83 | GFN_SERIF = 2, |
|---|
| 84 | GFN_SANSERIFMONO = 3, |
|---|
| 85 | GFN_SANSERIF = 4, |
|---|
| 86 | GFN_CASUAL = 5, |
|---|
| 87 | GFN_CURSIVE = 6, |
|---|
| 88 | GFN_SMALLCAPITAL = 7, |
|---|
| 89 | GFN_CC_DEFALUT = 20, //(23:SANSERIFMONO_FONT) |
|---|
| 90 | GFN_CC_SERIFMONO = 21, |
|---|
| 91 | GFN_CC_SERIF = 22, |
|---|
| 92 | GFN_CC_SANSERIFMONO = 23, |
|---|
| 93 | GFN_CC_SANSERIF = 24, |
|---|
| 94 | GFN_CC_CASUAL = 25, |
|---|
| 95 | GFN_CC_CURSIVE = 26, |
|---|
| 96 | GFN_CC_SMALLCAPITAL = 27, |
|---|
| 97 | GFN_HANGUL_NORMAL = 100 //Á¤±Û¿¡¼ »ç¿ëÇÏ´Â ÇÑ±ÛÆùÆ® id |
|---|
| 98 | }; |
|---|
| 99 | |
|---|
| 100 | /******* Pen Style ***********************************************************/ |
|---|
| 101 | #define GFN_PEN_NORMAL 0x00 |
|---|
| 102 | #define GFN_PEN_ITALIC 0x01 |
|---|
| 103 | #define GFN_PEN_UNDERLINE 0x02 |
|---|
| 104 | #define GFN_PEN_BOLD 0x04 |
|---|
| 105 | |
|---|
| 106 | /******* Font edge Á¾·ù ******************************************************/ |
|---|
| 107 | enum { |
|---|
| 108 | GFN_EDGE_NONE = 0, //edge ¾ø½¿ |
|---|
| 109 | GFN_EDGE_RAISED = 1, //edge °¡ string ÀÇ ÁÂÃø»ó´Ü¿¡ À§Ä¡ÇÔ |
|---|
| 110 | GFN_EDGE_DEPRESSED = 2, //edge °¡ string ÀÇ ¿ìÃøÇÏ´Ü¿¡ À§Ä¡ÇÔ |
|---|
| 111 | GFN_EDGE_UNIFORM = 3, //edge °¡ string ÀÇ outline ¿¡ À§Ä¡ÇÔ |
|---|
| 112 | GFN_EDGE_DROPSHADOW = 4 //edge °¡ string ¿¡ ¿À¹ö·¦µÇ¾î À§ÂÊ¿¡ À§Ä¡ÇÔ |
|---|
| 113 | }; |
|---|
| 114 | |
|---|
| 115 | #define DEGREE_TO_RADIAN 0.01745329251944 |
|---|
| 116 | /*----------------------------------------------------------------------------- |
|---|
| 117 | * data structure |
|---|
| 118 | *----------------------------------------------------------------------------*/ |
|---|
| 119 | /************************************************************* |
|---|
| 120 | FONT_STYLE Definition : |
|---|
| 121 | |
|---|
| 122 | SINT32 font_style; |
|---|
| 123 | enum { |
|---|
| 124 | GFN_DEFALUT = 0, //(3:SANSERIFMONO_FONT) |
|---|
| 125 | GFN_SERIFMONO = 1, |
|---|
| 126 | GFN_SERIF = 2, |
|---|
| 127 | GFN_SANSERIFMONO = 3, |
|---|
| 128 | GFN_SANSERIF = 4, |
|---|
| 129 | GFN_CASUAL = 5, |
|---|
| 130 | GFN_CURSIVE = 6, |
|---|
| 131 | GFN_SMALLCAPITAL = 7, |
|---|
| 132 | |
|---|
| 133 | GFN_CC_DEFALUT = 20, //(23:SANSERIFMONO_FONT) |
|---|
| 134 | GFN_CC_SERIFMONO = 21, |
|---|
| 135 | GFN_CC_SERIF = 22, |
|---|
| 136 | GFN_CC_SANSERIFMONO = 23, |
|---|
| 137 | GFN_CC_SANSERIF = 24, |
|---|
| 138 | GFN_CC_CASUAL = 25, |
|---|
| 139 | GFN_CC_CURSIVE = 26, |
|---|
| 140 | GFN_CC_SMALLCAPITAL = 27, |
|---|
| 141 | |
|---|
| 142 | GFN_HANGUL_NORMAL = 100 |
|---|
| 143 | |
|---|
| 144 | }; |
|---|
| 145 | |
|---|
| 146 | long font_size; |
|---|
| 147 | -> em size of font |
|---|
| 148 | |
|---|
| 149 | UINT8 edge_types; //0-4 |
|---|
| 150 | -> 0: GFN_EDGE_NONE |
|---|
| 151 | 1: GFN_EDGE_RAISED |
|---|
| 152 | 2: GFN_EDGE_DEPRESSED |
|---|
| 153 | 3: GFN_EDGE_UNIFORM |
|---|
| 154 | 4: GFN_EDGE_DROPSHADOW |
|---|
| 155 | |
|---|
| 156 | UINT8 pen_types; |
|---|
| 157 | -> 1st bit Italic (ex. pen_types | PEN_ITALIC, pen_types & ~PEN_ITALIC) |
|---|
| 158 | 2nd bit Underline (ex. pen_types | PEN_UNDERLINE, pen_types & ~PEN_UNDERLINE) italic degree : 30µµ |
|---|
| 159 | 3rd bit BOLD (ex. pen_types | PEN_BOLD, pen_types & ~PEN_BOLD) |
|---|
| 160 | |
|---|
| 161 | UINT32 text_color; |
|---|
| 162 | -> 256ÀÌ»óÀÏ °æ¿ì default color : white |
|---|
| 163 | |
|---|
| 164 | UINT32 edge_color; |
|---|
| 165 | -> 256ÀÌ»óÀÏ °æ¿ì default : black |
|---|
| 166 | |
|---|
| 167 | UINT32 back_color; |
|---|
| 168 | -> 256ÀÌ»óÀÏ °æ¿ì default : nothing |
|---|
| 169 | |
|---|
| 170 | int hor_pitch; |
|---|
| 171 | -> ±ÛÀÚ°£°Ý |
|---|
| 172 | |
|---|
| 173 | int ver_pitch; |
|---|
| 174 | -> ÁÙ°£°Ý |
|---|
| 175 | |
|---|
| 176 | UINT8 hor_align; |
|---|
| 177 | -> (0: Left, 1: Center, 2: Right) |
|---|
| 178 | |
|---|
| 179 | UINT8 ver_align; |
|---|
| 180 | -> (0: Top, 1: Middle, 2: Bottom) |
|---|
| 181 | |
|---|
| 182 | UINT8 backcolor_used; //back color is used |
|---|
| 183 | UINT8 wordrap; //0: no wordrap, 1: apply wordrap && delete wordrap space, 2: apply wordrap && maintain wordrap space |
|---|
| 184 | UINT8 same_char_width; //1: same charater width, 0 :none |
|---|
| 185 | UINT8 cutting; //0:[...]Ç¥½Ã, 1: cutting |
|---|
| 186 | GFN_JUSTIFY justify; //0=GFN_LEFT,ÀÌÈÄ ¼ø¼´ë·Î GFN_CENTER, GFN_RIGHT, |
|---|
| 187 | //GFN_CENTER_TOP,GFN_LEFT_CENTER,GFN_RIGHT_CENTER |
|---|
| 188 | UINT8 real_center; //back box ¸¦ ±âÁØÀ¸·Î ÇÑ center |
|---|
| 189 | int space_ofs_x; //space ¿Í ÀÌÈÄ¿¡ Ãâ·ÂµÉ ±ÛÀÚ¿ÍÀÇ ofs_x, |
|---|
| 190 | |
|---|
| 191 | *************************************************************/ |
|---|
| 192 | /******* Font ¼Ó¼º ±¸Á¶Ã¼ ****************************************************/ |
|---|
| 193 | typedef struct { |
|---|
| 194 | SINT32 font_style; //0-7,100 |
|---|
| 195 | SINT32 font_width; //em_size |
|---|
| 196 | SINT32 font_height; //em_size |
|---|
| 197 | UINT8 edge_types; //0-4 |
|---|
| 198 | UINT8 pen_types; //1st bit Italic, 2nd bit Underline, 3rd bit BOLD |
|---|
| 199 | UINT32 text_color; //256ÀÌ»óÀÏ °æ¿ì default : white |
|---|
| 200 | UINT32 edge_color; //256ÀÌ»óÀÏ °æ¿ì default : black |
|---|
| 201 | UINT32 back_color; //256ÀÌ»óÀÏ °æ¿ì default : nothing |
|---|
| 202 | int hor_pitch; //±ÛÀÚ°£°Ý |
|---|
| 203 | int ver_pitch; //ÁÙ°£°Ý |
|---|
| 204 | UINT8 hor_align; //0: Left, 1: Center, 2: Right |
|---|
| 205 | UINT8 ver_align; //0: Top, 1: Middle, 2: Bottom |
|---|
| 206 | |
|---|
| 207 | UINT8 backcolor_used; //back color is used |
|---|
| 208 | UINT8 wordrap; //1=>wordrap |
|---|
| 209 | UINT8 same_char_width;//not used |
|---|
| 210 | UINT8 cutting; //0:[...]Ç¥½Ã, 1: cutting |
|---|
| 211 | GFN_JUSTIFY justify; //0=GFN_LEFT,ÀÌÈÄ ¼ø¼´ë·Î GFN_CENTER, GFN_RIGHT,... |
|---|
| 212 | UINT8 real_center; //back box ¸¦ ±âÁØÀ¸·Î ÇÑ center |
|---|
| 213 | int space_ofs_x; //space ¿Í ÀÌÈÄ¿¡ Ãâ·ÂµÉ ±ÛÀÚ¿ÍÀÇ ofs_x, |
|---|
| 214 | } GFN_FONT_ATTR; |
|---|
| 215 | |
|---|
| 216 | /******* BITMAP font data map ÀÌ ¾î¶»°Ô ±¸¼ºµÇ¾îÀִ°¡¸¦ ³ªÅ¸³¿ ***************/ |
|---|
| 217 | typedef struct { |
|---|
| 218 | char start_ofsx; |
|---|
| 219 | char start_ofsy; |
|---|
| 220 | unsigned char char_width; //active font width |
|---|
| 221 | unsigned char char_height; |
|---|
| 222 | |
|---|
| 223 | unsigned char byte_per_line; |
|---|
| 224 | unsigned char reserved; |
|---|
| 225 | unsigned short unicode_id; |
|---|
| 226 | unsigned char *bitmap; |
|---|
| 227 | |
|---|
| 228 | }GFN_BIT_CHAR; |
|---|
| 229 | |
|---|
| 230 | typedef struct { |
|---|
| 231 | unsigned short min_char; //minimum character in this font |
|---|
| 232 | unsigned short max_char; //maximum character in this font |
|---|
| 233 | unsigned char bit_used; // 0 or 1 : 1bit , 2: 2bit font |
|---|
| 234 | unsigned char max_width; |
|---|
| 235 | unsigned char max_height; |
|---|
| 236 | unsigned char reserved; |
|---|
| 237 | unsigned short reserved1; |
|---|
| 238 | unsigned short num_char; |
|---|
| 239 | GFN_BIT_CHAR *font; //fonts |
|---|
| 240 | }GFN_USERFONT; |
|---|
| 241 | |
|---|
| 242 | typedef struct { |
|---|
| 243 | char start_ofsx; //ÇöÀç´Â 0À¸·Î °íÁ¤µÊ |
|---|
| 244 | char start_ofsy; //º¯°æµÇ´Â °ª |
|---|
| 245 | unsigned char real_width; //°íÁ¤µÈ °ª |
|---|
| 246 | unsigned char real_height; //°íÁ¤µÈ °ª |
|---|
| 247 | unsigned char max_width; //ÇöÀç´Â real_width ¿Í µ¿ÀÏÇÔ |
|---|
| 248 | unsigned char max_height; //real_height+offset_y(ÃÖ¼ÒÇÑ real_height) |
|---|
| 249 | |
|---|
| 250 | unsigned char *f_kerning_x; //Ãʼº |
|---|
| 251 | unsigned char *f_kerning_y; |
|---|
| 252 | unsigned char *s_kerning_x; //Áß¼º |
|---|
| 253 | unsigned char *s_kerning_y; |
|---|
| 254 | unsigned char *t_kerning_x; //Á¾¼º |
|---|
| 255 | unsigned char *t_kerning_y; |
|---|
| 256 | |
|---|
| 257 | unsigned char *f_char_width; |
|---|
| 258 | unsigned char *f_char_height; |
|---|
| 259 | unsigned char *s_char_width; |
|---|
| 260 | unsigned char *s_char_height; |
|---|
| 261 | unsigned char *t_char_width; |
|---|
| 262 | unsigned char *t_char_height; |
|---|
| 263 | |
|---|
| 264 | unsigned short *f_start_index; //bitmap ¹è¿¿¡¼ÀÇ ½ÃÀÛÀ§Ä¡ |
|---|
| 265 | unsigned short *s_start_index; |
|---|
| 266 | unsigned short *t_start_index; |
|---|
| 267 | |
|---|
| 268 | unsigned short *f_bitmap; |
|---|
| 269 | unsigned short *s_bitmap; |
|---|
| 270 | unsigned short *t_bitmap; |
|---|
| 271 | }DST_HANGUL_FONT; |
|---|
| 272 | |
|---|
| 273 | /*----------------------------------------------------------------------------- |
|---|
| 274 | * function prototype |
|---|
| 275 | *----------------------------------------------------------------------------*/ |
|---|
| 276 | /******* font manager init, terminate ****************************************/ |
|---|
| 277 | void GFN_Init(CANVAS *cv) ; |
|---|
| 278 | void GFN_InitEx(CANVAS *cv, GRP_NATION font_nation) ; |
|---|
| 279 | void GFN_Terminate(void) ; |
|---|
| 280 | |
|---|
| 281 | /******* string print ********************************************************/ |
|---|
| 282 | void GFN_CenterPrint(CANVAS *cv, SINT32 sx, SINT32 sy, SINT32 w ,SINT32 h , SINT8 *str, UINT32 text_color ) ; |
|---|
| 283 | #define GFN_CenterPrintR(cv,r, str,text_color) GFN_CenterPrint(cv,(SINT32)((r)->x),(SINT32)((r)->y),(SINT32)((r)->w),(SINT32)((r)->h),str, text_color ) |
|---|
| 284 | void GFN_LinePrint(CANVAS *cv, SINT32 sx, SINT32 sy, SINT32 width, SINT8 *str, UINT32 text_color) ; |
|---|
| 285 | void GFN_Print(CANVAS *cv, SINT32 sx, SINT32 sy, SINT32 w, SINT32 h, SINT8 *str, UINT32 text_color ) ; |
|---|
| 286 | #define GFN_PrintR(cv,r, str,text_color) GFN_Print(cv,(SINT32)((r)->x),(SINT32)((r)->y),(SINT32)((r)->w),(SINT32)((r)->h),str, text_color ) |
|---|
| 287 | SINT32 GFN_PrintXY(CANVAS *cv, SINT32 sx, SINT32 sy, SINT8 *str, UINT32 text_color ) ; |
|---|
| 288 | void GFN_GetLineHeight(CANVAS *cv,SINT32 *h ) ; |
|---|
| 289 | void GFN_GetMaxCharSize( CANVAS *cv,int *w, int *h ) ; |
|---|
| 290 | void GFN_GetStrSize(CANVAS *cv, SINT32 *w, SINT32 *h, SINT8 * str) ; |
|---|
| 291 | |
|---|
| 292 | /******* unicode string print ************************************************/ |
|---|
| 293 | void GFN_UCenterPrint(CANVAS *cv, SINT32 sx, SINT32 sy, SINT32 w ,SINT32 h , UINT16 *str, UINT32 text_color ) ; |
|---|
| 294 | #define GFN_UCenterPrintR(cv, r, str, text_color) GFN_UCenterPrint(cv,(SINT32)((r)->x),(SINT32)((r)->y),(SINT32)((r)->w),(SINT32)((r)->h),str,text_color) |
|---|
| 295 | void GFN_ULinePrint(CANVAS *cv, SINT32 sx, SINT32 sy, SINT32 width, UINT16 *str, UINT32 text_color) ; |
|---|
| 296 | void GFN_UPrint(CANVAS *cv, SINT32 sx, SINT32 sy, SINT32 w ,SINT32 h , UINT16 *str, UINT32 text_color ) ; |
|---|
| 297 | #define GFN_UPrintR(cv,r, str,text_color) GFN_UPrint(cv,(SINT32)((r)->x),(SINT32)((r)->y),(SINT32)((r)->w),(SINT32)((r)->h),str, text_color ) |
|---|
| 298 | SINT32 GFN_UPrintXY(CANVAS *cv, SINT32 sx, SINT32 sy, UINT16 *str, UINT32 text_color ) ; |
|---|
| 299 | void GFN_UGetStrSize(CANVAS *cv, SINT32 *w,SINT32 *h, UINT16 *str) ; |
|---|
| 300 | |
|---|
| 301 | /******* page print **********************************************************/ |
|---|
| 302 | void GFN_OpenPagePrint(CANVAS *cv, SINT32 sx, SINT32 sy, SINT32 w, SINT32 h, SINT8 *str, UINT32 text_color, UINT32 back_color) ; |
|---|
| 303 | #define GFN_OpenPagePrintR(cv,r, str,text_color,back_color) GFN_OpenPagePrint(cv,(SINT32)((r)->x),(SINT32)((r)->y),(SINT32)((r)->w),(SINT32)((r)->h),str, text_color,back_color ) |
|---|
| 304 | void GFN_GetPageInfo(CANVAS *cv, SINT32 *total_line, SINT32 *line_per_page, SINT32 *top_index, SINT32 *curr_pos_index) ; |
|---|
| 305 | |
|---|
| 306 | /******* unicode page print **************************************************/ |
|---|
| 307 | void GFN_UOpenPagePrint(CANVAS *cv, SINT32 sx, SINT32 sy, SINT32 w, SINT32 h, UINT16 *str, UINT32 text_color, UINT32 back_color) ; |
|---|
| 308 | #define GFN_UOpenPagePrintR(cv,r, str,text_color,back_color) GFN_UOpenPagePrint(cv,(SINT32)((r)->x),(SINT32)((r)->y),(SINT32)((r)->w),(SINT32)((r)->h),str, text_color,back_color ) |
|---|
| 309 | |
|---|
| 310 | /******* page print operation ************************************************/ |
|---|
| 311 | void GFN_ClosePagePrint(CANVAS *cv) ; |
|---|
| 312 | void GFN_PageMoveDown(CANVAS *cv, SINT32 refresh_now ) ; |
|---|
| 313 | void GFN_PageMoveUp(CANVAS *cv, SINT32 refresh_now ) ; |
|---|
| 314 | |
|---|
| 315 | /******* font attribute ******************************************************/ |
|---|
| 316 | void GFN_GetEdgeType(CANVAS *cv,UINT8 *edge_type,UINT32 *edge_color) ; |
|---|
| 317 | void GFN_GetFontAttr(CANVAS *cv, GFN_FONT_ATTR *font_attr ) ; |
|---|
| 318 | void GFN_SetAlign(CANVAS *cv, UINT8 hor_align,UINT8 ver_align) ; |
|---|
| 319 | void GFN_SetBakColor(CANVAS *cv, UINT8 bakcolor_used, UINT32 back_color ) ; |
|---|
| 320 | void GFN_SetEdgeType(CANVAS *cv, UINT8 edge_type , UINT32 edge_color ) ; |
|---|
| 321 | void GFN_SetFontAttr(CANVAS *cv, GFN_FONT_ATTR *font_attr ) ; |
|---|
| 322 | GRP_NATION GFN_GetFontNation(CANVAS *cv) ; |
|---|
| 323 | void GFN_SetFontNation(CANVAS *cv, GRP_NATION font_nation) ; |
|---|
| 324 | void GFN_SetFontStyle(CANVAS *cv, SINT32 font_style, SINT32 font_width, SINT32 font_height) ; |
|---|
| 325 | void GFN_SetOutputStyle(CANVAS *cv, GFN_JUSTIFY justify, SINT32 same_char_width, UINT8 wordrap, UINT8 cutting) ; |
|---|
| 326 | void GFN_SetPenType(CANVAS *cv, UINT8 pen_type ) ; |
|---|
| 327 | void GFN_SetPitch(CANVAS *cv, SINT32 hor_pitch,SINT32 ver_pitch) ; |
|---|
| 328 | void GFN_SetSpaceOffsetX(CANVAS *cv, SINT32 space_ofs_x) ; |
|---|
| 329 | |
|---|
| 330 | /******* user font info ******************************************************/ |
|---|
| 331 | SINT32 GFN_RegisterUserFont(CANVAS *cv, void *user_font) ; |
|---|
| 332 | void GFN_GetUserFont(CANVAS *cv, void **user_finfo) ; |
|---|
| 333 | |
|---|
| 334 | /******* dst font info *******************************************************/ |
|---|
| 335 | SINT32 GFN_RegisterDstFont(CANVAS *cv, void *dst_hfont, void *user_efont) ; |
|---|
| 336 | |
|---|
| 337 | /******* font mode info ******************************************************/ |
|---|
| 338 | void GFN_GetFontMode(CANVAS *cv,GFN_FONT_MODE *font_mode) ; |
|---|
| 339 | void GFN_SetFontMode(CANVAS *cv, GFN_FONT_MODE font_mode) ; |
|---|
| 340 | |
|---|
| 341 | /******* font config *********************************************************/ |
|---|
| 342 | void GFN_GetFontConfigFromCv(CANVAS *cv, GFN_FONT_ATTR *font_attr, GFN_FONT_MODE *font_mode) ; |
|---|
| 343 | void GFN_SetFontConfigToCv(CANVAS *cv, GFN_FONT_ATTR *font_attr, GFN_FONT_MODE font_mode); |
|---|
| 344 | |
|---|
| 345 | /******* font util ***********************************************************/ |
|---|
| 346 | int GFN_HStrLen(unsigned char *ucp) ; |
|---|
| 347 | int GFN_UStrLen(unsigned short *usp) ; |
|---|
| 348 | int GFN_UStrCpy(unsigned short *tar, unsigned short *src) ; |
|---|
| 349 | |
|---|
| 350 | SINT32 GFN_Ascii2Unicode(unsigned char *in_str, unsigned short *out_str) ; |
|---|
| 351 | SINT32 GFN_ConvCharcode(unsigned char *in_str, unsigned short *out_str, BOOLEAN bConvert) ; |
|---|
| 352 | |
|---|
| 353 | #ifdef __cplusplus |
|---|
| 354 | } |
|---|
| 355 | #endif |
|---|
| 356 | |
|---|
| 357 | #endif |
|---|
| 358 | //-----------------------------------------end of file |
|---|