資源簡介
常用軟字庫(HZK16,HZK32,ASC16)和示例代碼

代碼片段和文件信息
/**************************************************************************
**?this?C?source?code?is?made?for?HZK16?and?ASC16?characters?system?***
**??????????????????***
**????????????newplan?2013.9???in?UESTC?????***
**************************************************************************/
#include?
#include?
#include?
#define?FONTSIZE?32
//typedef?unsigned?int????WORD;
//typedef?unsigned?char???BYTE;
/**********************************************************************************************/
int?Get_Asc_Code(unsigned?char?*Get_Input_Char?char?buff[]);
int?Get_HzK_Code(unsigned?char?*Get_Input_Char?char?buff[]);
void?Print_Asc_Char(char?*mat?char?*Out_Put_1?char?*Out_Put_2);
void?Print_HzK_Char(char?*mat?char?*Out_Put_1?char?*Out_Put_2);
unsigned?long?Judge_type_char(unsigned?char?*Get_Input_Char?unsigned?long?*offset?int?*length);
int?Delete_Char_From_Lib(char?*character?unsigned?long?offset?char?*Lib_Name);
int?Get_Char_Model(unsigned?char?buff_input[FONTSIZE?*?FONTSIZE?/?8]);
int?Not_In_Lib(char?buff[FONTSIZE?*?FONTSIZE?/?8]);
int?transpose(char?chaned[FONTSIZE][FONTSIZE]);
void?distranspose(char?mat[][FONTSIZE?/?8]?char?**array);
int?asistant_insert(unsigned?char?*mat);
void?change(char?mat[][FONTSIZE?/?8]?char?**array);
/**********************************************************************************************/
int?output_system(void);
int?insert_system(void);
int?delete_system(void);
//*******************************************************************
//?Method:????Get_Asc_Code
//?FullName:??Get_Asc_Code
//?Access:????public
//?Returns:???int
//?Qualifier:?得到英文字符的字模信息,存入數組
//?Parameter:?unsigned?char?*?Get_Input_Char?要得到字模信息的字符指針
//?Parameter:?char?buff[]?存儲得到字模信息的數組
//********************************************************************
int?Get_Asc_Code(unsigned?char?*Get_Input_Char?char?buff[])
{
unsigned?long?offset;
FILE?*ASC;
/*打開字庫文件asc16*/
if?((ASC?=?fopen(“ASC16“?“rb+“))?==?NULL)
{
printf(“Can‘t?open?ascPlease?add?it?“);
system(“pause“);
exit(0);
}
offset?=?*(Get_Input_Char)?*?16?+?1;?????????/*通過ascii碼算出偏移量*/
fseek(ASC?offset?SEEK_SET);????????????????/*將文件指針移動到偏移量的位置*/
fread(buff?16?1?ASC);?????????????????????/*從偏移量的位置讀取32個字節*/
printf(“ASCII:%doffset:%d?\n\r“?*Get_Input_Char?offset);
fclose(ASC);
return?1;
}
//*****************************************************************************
//?Method:????Print_Asc_Char
//?FullName:??Print_Asc_Char
//?Access:????public
//?Returns:???void
//?Qualifier:?根據字模信息輸出英文字符
//?Parameter:?char?*?mat?字模指針
//?Parameter:?char?*?Out_Put_1?字模中為1的點顯示的字符,也就是前景字符
//?Parameter:?char?*?Out_Put_2?字模中為0的點顯示的字符,也就是背景字符
//***************************************************************
void?Print_Asc_Char(char?*mat?char?*Out_Put_1?char?*Out_Put_2)
{
int?i?j;
for?(i?=?0;?i?16;?i++)??????????/*?8x16的點陣,一共有16行*/
{
for?(j?=?0;?j?8;?j++)
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-03-18?09:50??字體庫\
?????文件????????4096??2010-06-26?21:45??字體庫\ASC16
?????文件??????196272??1996-09-25?12:02??字體庫\HZK12
?????文件??????267616??1997-10-21?05:58??字體庫\HZK16
?????文件???????12981??2011-07-03?10:11??字體庫\hzk16的介紹以及簡單的使用方法.txt
?????文件?????1131008??2016-02-26?19:39??字體庫\HZK32
?????文件???????21073??2017-03-18?09:36??字體庫\test.c
- 上一篇:pandas函數匯總
- 下一篇:surpac轉ansys.rar
評論
共有 條評論