亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ucguifontgen.cpp

?? UCGUIFontTool 生成漢字點陣
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
// UCGUIFontGen.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"
#include "UCGUIFontGen.h"
#include "resource.h"
#include "math.h"
#include "malloc.h"

#include <commdlg.h>
#include <commctrl.h>

//#define fontfile	"hzk24h.c"
//#define fontname	"Simsun"
#define fontbytes	fontsize * byteline			//一個點陣所占字節數...

#define Need_Note	1

int fontXDist		=	12;
int fontsize		=	12;
int byteline		=	2;	//字體一行的字節數...
char fontname[100];
char fontfile[100];

int OutputCharFlag[300];	//第一位都有于記載位于此位的字符是否輸出...

#define FONTKING 15
OutputFontName fontNameStruct[FONTKING] = {
	{"宋體", "SimSun"},
	{"黑體", "SimHei"},
	{"幼圓", "YouYuan"},
	{"新宋體", "NewSimSun"},
	{"隸書", "LiSu"},
	{"楷體_GB2312", "KaiTi"},
	{"華文中宋", "STZhongSong"},
	{"華文行楷", "STXingKai"},
	{"華文新魏", "STXinWei"},
	{"華文細黑", "STXiHei"},
	{"華文仿宋", "STFangSong"},
	{"華文彩云", "STCaiYun"},
	{"仿宋_GB2312", "FangSong_GB2312"},
	{"方正姚體", "FZYaoTi"},
	{"方正舒體", "FZShuTi"}
};

  char hzkhead[] = "#include \"..\\core\\GUI.H\" \n\
#ifndef GUI_FLASH \n\
	#define GUI_FLASH \n\
#endif \n\
extern GUI_FLASH const GUI_FONT GUI_FontHZ_%s;\n";

  char hzktitleinfo[] = "/* %s - %s font for UCGUI font driver */ \n\
/********************************************************************************************************\n\
*                                            UCGUI\n\
*                                       http://www.ucgui.com\n\
*\n\
*                             (c) Copyright 2005-2006, UCGUI專業論壇, 學習交流UCGUI\n\
*\n\
*                               	ucgui@16.com 2005.07.31\n\
*                                           作者: ucgui\n\
*********************************************************************************************************\n\
*/\n";

  char hzkprefix[] = "GUI_FLASH  const unsigned char acFontHZ%s_%02x%2x[%d] = {	%s";
  char hzkfontexplain[] = "/* %s */";
  char hzkprefix_tmp[300];
  char hzkprefix_long_tmp[1000];

  char hzksuffix[] = "};\n";

  char hzkcharinfo[] = "GUI_FLASH const GUI_CHARINFO GUI_FontHZ%s_CharInfo[%d] = {";

#ifdef Need_Note
  char hzkcharinfo_2[] = "{ %d, %d, %d, (void GUI_FLASH *)&acFontHZ%s_%02x%2x},/* %s %d */";
#else
  char hzkcharinfo_2[] = "{ %d, %d, %d, (void GUI_FLASH *)&acFontHZ%s_%02x%2x},";
#endif

  char hzkpropinfo[] = "GUI_FLASH  const GUI_FONT_PROP GUI_FontHZ%s_Prop%s= {\n\
      0x%02x%02x,\n\
      0x%02x%02x,\n\
      &GUI_FontHZ%s_CharInfo[%d],\n\
      (void *)&GUI_FontHZ%s_Prop%s \n\
};";

  char hzkpropascinfo[] = "\nGUI_FLASH const GUI_FONT_PROP GUI_FontHZ%s_Prop%s= {\n\
      0x%02x%02x,\n\
      0x%02x%02x,\n\
      &GUI_FontHZ%s_CharInfo[%d],\n\
      (void *)&GUI_FontHZ%s_Prop%s \n\
};";

  char hzkproplastinfo[] = "\nGUI_FLASH const GUI_FONT_PROP GUI_FontHZ%s_Prop%s= {\n\
      0x%02x%02x,\n\
      0x%02x%02x,\n\
      &GUI_FontHZ%s_CharInfo[%d],\n\
      (void *)%s \n\
};";

  char hzkfontinfo[] = "GUI_FLASH const GUI_FONT GUI_FontHZ_%s = {\n\
      GUI_FONTTYPE_PROP_SJIS, \n\
      %d, \n\
      %d, \n\
      %d,  \n\
      %d,  \n\
      (void GUI_FLASH *)&GUI_FontHZ%s_Prop%s\n\
};";


LRESULT CALLBACK GenAllFontProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK ChooseFontProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);


HWND g_hDlg = 0;
HINSTANCE g_hInst = 0;
HDC hDC = 0;
FILE* fp = 0;
int i = 0, j = 0;
BYTE area1 = 0, area2 = 0;

BOOL APIENTRY DllMain( HANDLE hModule, 
                       DWORD  ul_reason_for_call, 
                       LPVOID lpReserved
					 )
{
	g_hInst = (HINSTANCE)hModule;
    return TRUE;
}


void WirteHZKFile(char* buf, int len, FILE* fp)
{
	fprintf(fp, "%s\n", (unsigned char* )buf);
	fflush(fp);
}


///////////////////////////////////////////////////////////////////////
//
// 函數名       : GetAscCharIsOut
// 功能描述     : 獲取指定Ascii字符是否輸出...
// 參數         : BYTE ascCode
// 返回值       : bool 
//
///////////////////////////////////////////////////////////////////////
bool GetAscCharIsOut(BYTE ascCode)
{
	int IsOut = 0;
	IsOut = OutputCharFlag[(ascCode-0x20)/32];
	IsOut = (IsOut & (1 << (ascCode-0x20)%32)) >> ((ascCode-0x20)%32);
	if(!IsOut) return 0;
	return 1;
}


///////////////////////////////////////////////////////////////////////
//
// 函數名       : GetHZCharIsOut
// 功能描述     : 判斷指定漢字字符是否輸出...
// 參數         : BYTE area1
// 參數         : BYTE area2
// 返回值       : bool 
//
///////////////////////////////////////////////////////////////////////
bool GetHZCharIsOut(BYTE area1, BYTE area2)
{
	int IsOut = 0;
	int BytePos = 0;
	if(area1 < 0xa1 || area2 < 0xa1 )  return 0;
	BytePos = (area1-0xa1)*94 + (area2 - 0xa1) + 0x60;
	IsOut = OutputCharFlag[BytePos/32];
	IsOut = (IsOut & (1 << BytePos%32)) >> (BytePos%32);
	if(!IsOut) return 0;
	return 1;
}


///////////////////////////////////////////////////////////////////////
//
// 函數名       : GetCharInfoPos
// 功能描述     : 獲取指定字符在選定輸出的字符中的序列號...
// 參數         : BYTE area1
// 參數         : BYTE area2
// 返回值       : int 
//
///////////////////////////////////////////////////////////////////////
int GetCharInfoPos(BYTE area1, BYTE area2)
{
	int i = 0;
	int IsOut = 0;
	int BytePos = 0;
	int bppPos = 0;
	if(area2 == 0){
		if(area1 < 0x20 || area1 > 0x80 ) return 0;
		BytePos = area1 - 0x20;
		IsOut = OutputCharFlag[BytePos/32];
	}
	else if(area2 > 0xa0){
		if(area1 < 0xa1 || area2 < 0xa1 )  return 0;
		BytePos = (area1-0xa1)*94 + (area2 - 0xa1) + 0x60;
		IsOut = OutputCharFlag[BytePos/32];
	}
	else return 0;

	for(i = 0; i < BytePos/32; i++){
		if(OutputCharFlag[i] == 0) continue;
		if(OutputCharFlag[i] == 0xffffffff){
			bppPos += 32;
			continue;
		}
		for(int j = 0; j < 32; j++){
			if((OutputCharFlag[i] >> j) & 1) bppPos++;
		}
	}
	for(i = 0; i < BytePos%32; i++){
		if((IsOut >> i) & 1) bppPos++;
	}
	return bppPos;		
}


bool GenFontInfo(char* lastPropName)
{
	if(lastPropName){
		sprintf(hzkprefix_tmp, hzkfontinfo, fontname, fontsize, fontsize, 1, 1, fontname, lastPropName);
	}
	else
		sprintf(hzkprefix_tmp, hzkfontinfo, fontname, fontsize, fontsize, 1, 1, fontname);
	WirteHZKFile(hzkprefix_tmp, strlen(hzkprefix_tmp), fp);	 	
	return 1;
}

char* GenFontPropInfo()
{
	char tmpbuf[100];
	char* lastPropName = NULL;
	int offset = 0, FileLen = 0;
//	unsigned char onehz[10];
	bool fisrtPropInfo = 0;/*, findFirst = 0;*/
	BYTE firstCharacter = 0, lastCharacter = 0;
	int charOffsetPos = 0, IsOut = 0;
	OutPutCharProp* lpoutPrePropInfo = NULL, *lpoutCurPropInfo = NULL, *lpoutFirstPropInfo = NULL;
	memset(hzkprefix_tmp, 0, 300);
	int noOutputRange = GetCharInfoPos(0xb0, 0xa1) - GetCharInfoPos(0xa9, 0xff);
	for(area1 = 0xf7; area1 > 0xa0; area1--){
		if(area1 > 0xa9 && area1 < 0xb0) continue;
		for(area2 = 0xfe; area2 > 0xa0; area2--){
			IsOut = GetHZCharIsOut(area1, area2);
			if(lastCharacter == 0 && IsOut){
				lastCharacter = area2;
				if(lastCharacter != 0xa1) continue;	//分區邊界時, 要注意...
			}
			if(lastCharacter == 0)	continue;
			if(IsOut && area2 != 0xa1 && lastCharacter != 0xa1) continue;	//到達漢字分區時,必須切斷...
			if(area2 == 0xa1) firstCharacter = area2;
			else firstCharacter = area2+1;
			if(area1 >= 0xb0){
				charOffsetPos = GetCharInfoPos(area1, firstCharacter) - noOutputRange;
			}
			else{
				charOffsetPos = GetCharInfoPos(area1, firstCharacter);
			}
			sprintf(tmpbuf, "%02x%02x", area1, firstCharacter);
			if(fisrtPropInfo == 0)
				sprintf(hzkprefix_tmp, hzkproplastinfo, fontname, tmpbuf, area1, firstCharacter, area1, lastCharacter, fontname, charOffsetPos, "0");
			else
				sprintf(hzkprefix_tmp, hzkpropinfo, fontname, tmpbuf, area1, firstCharacter, area1, lastCharacter, fontname, charOffsetPos, fontname, "%s");			
	
			lpoutCurPropInfo = (OutPutCharProp*) malloc(sizeof(OutPutCharProp));
			if(!lpoutCurPropInfo) continue;
			lpoutCurPropInfo->firstCharacter[0] = area1;
			lpoutCurPropInfo->firstCharacter[1] = firstCharacter;
			lpoutCurPropInfo->firstCharacter[2] = 0;
			lpoutCurPropInfo->lastCharacter[0] = area1;
			lpoutCurPropInfo->lastCharacter[1] = lastCharacter;
			lpoutCurPropInfo->lastCharacter[2] = 0;

			strcpy(lpoutCurPropInfo->propName, tmpbuf);
			lpoutCurPropInfo->lpPropChar = (char*) malloc(strlen(hzkprefix_tmp)*sizeof(char)+1);
			memcpy(lpoutCurPropInfo->lpPropChar, hzkprefix_tmp, strlen(hzkprefix_tmp));
			lpoutCurPropInfo->lpPropChar[strlen(hzkprefix_tmp)] = 0;
			memset(hzkprefix_tmp, 0, strlen(hzkprefix_tmp));
			lpoutCurPropInfo->lpNext = NULL;
			if(lpoutPrePropInfo == NULL){
				lpoutPrePropInfo = lpoutCurPropInfo;
				lpoutFirstPropInfo = lpoutCurPropInfo;	//記住鏈表頭指針...
			}
			else{
				lpoutPrePropInfo->lpNext = lpoutCurPropInfo;
			}
			lpoutPrePropInfo = lpoutCurPropInfo;
			fisrtPropInfo = 1;	
			lastCharacter = 0;	//注意這一點...
		}
	}
	for(area1 = 0; area1 == 0; area1--){
		for(area2 = 0x7f; area2 >= 0x20; area2--){
			IsOut = GetAscCharIsOut(area2);
			if(lastCharacter == 0 && IsOut){
				lastCharacter = area2;
				continue;
			}
			if(lastCharacter == 0)	continue;
			if(IsOut && area2 != 0x20) continue;	//到達漢字分區時,必須切斷...
			if(area2 == 0x20) firstCharacter = area2;
			else firstCharacter = area2+1;
			charOffsetPos = GetCharInfoPos(area1, firstCharacter);
			sprintf(tmpbuf, "%02x%02x", area1, firstCharacter);
			sprintf(hzkprefix_tmp, hzkpropinfo, fontname, tmpbuf, area1, firstCharacter, area1, lastCharacter, fontname, charOffsetPos, fontname, "%s");
			lpoutCurPropInfo = (OutPutCharProp*) malloc(sizeof(OutPutCharProp));
			if(!lpoutCurPropInfo) continue;

			lpoutCurPropInfo->firstCharacter[0] = firstCharacter;
			lpoutCurPropInfo->firstCharacter[1] = 0;
			lpoutCurPropInfo->lastCharacter[0] = lastCharacter;
			lpoutCurPropInfo->lastCharacter[1] = 0;

			strcpy(lpoutCurPropInfo->propName, tmpbuf);
			//注意分配了符串時要多分配1字節, 用于存0表示字符串結束的. 不則strcpy時會占用后面一個字節
			//從而破壞了用free此內存的數據結構, 每一分配的內存前后均有用于管理此塊內存的數據, 否則free時會出錯...
			lpoutCurPropInfo->lpPropChar = (char*) malloc(strlen(hzkprefix_tmp)*sizeof(char)+1);
			strcpy(lpoutCurPropInfo->lpPropChar, hzkprefix_tmp);

			memset(hzkprefix_tmp, 0, strlen(hzkprefix_tmp));
			lpoutCurPropInfo->lpNext = NULL;
			if(lpoutPrePropInfo == NULL){
				lpoutPrePropInfo = lpoutCurPropInfo;
				lpoutFirstPropInfo = lpoutCurPropInfo;	//記住鏈表頭指針...
			}
			else{
				lpoutPrePropInfo->lpNext = lpoutCurPropInfo;
			}
			lpoutPrePropInfo = lpoutCurPropInfo;
			lastCharacter = 0;	//注意這一點...
		}
	}
	if(lpoutCurPropInfo){
		lastPropName = (char*) malloc(sizeof(char)*strlen(lpoutCurPropInfo->propName)+1);
		strcpy(lastPropName, lpoutCurPropInfo->propName);
	}
	if(lpoutFirstPropInfo){
		if(lpoutFirstPropInfo->lpPropChar){
			#ifdef Need_Note
				sprintf(hzkprefix_tmp, "/*%s--%s*/", lpoutFirstPropInfo->firstCharacter, lpoutFirstPropInfo->lastCharacter);
				WirteHZKFile(hzkprefix_tmp, strlen(hzkprefix_tmp), fp);	 		
				memset(hzkprefix_tmp, 0, strlen(hzkprefix_tmp));
			#endif
			WirteHZKFile(lpoutFirstPropInfo->lpPropChar, strlen(lpoutFirstPropInfo->lpPropChar), fp);
		}
		lpoutPrePropInfo = lpoutFirstPropInfo;
		lpoutFirstPropInfo = lpoutFirstPropInfo->lpNext;
	}
	for(; lpoutFirstPropInfo != NULL; lpoutFirstPropInfo = lpoutFirstPropInfo->lpNext){
		if(lpoutFirstPropInfo->lpPropChar){
			#ifdef Need_Note
				sprintf(hzkprefix_tmp, "/*%s--%s*/", lpoutFirstPropInfo->firstCharacter, lpoutFirstPropInfo->lastCharacter);
				WirteHZKFile(hzkprefix_tmp, strlen(hzkprefix_tmp), fp);	 		
				memset(hzkprefix_tmp, 0, strlen(hzkprefix_tmp));
			#endif
			sprintf(hzkprefix_tmp, lpoutFirstPropInfo->lpPropChar, lpoutPrePropInfo->propName);
			WirteHZKFile(hzkprefix_tmp, strlen(hzkprefix_tmp), fp);	 		
		}
		if(lpoutPrePropInfo){
			if(lpoutPrePropInfo->lpPropChar) free(lpoutPrePropInfo->lpPropChar);
			 free(lpoutPrePropInfo);
		}
		lpoutPrePropInfo = lpoutFirstPropInfo;		
	}	
	if(lpoutPrePropInfo){
		if(lpoutPrePropInfo->lpPropChar) free(lpoutPrePropInfo->lpPropChar);
		free(lpoutPrePropInfo);
	}
	return lastPropName;
}

CHARINFO GetOneCharInfo(int area1, int area2)
{
	CHARINFO retCharInfo;
	SIZE SizeChar;
	unsigned char HZ[3];
	HZ[0] = area1; HZ[1] = area2; HZ[2] = 0x0;
	GetTextExtentPoint(hDC, (LPCTSTR)HZ, strlen((const char *)HZ), &SizeChar);
	retCharInfo.XDist = (BYTE)SizeChar.cx;
	retCharInfo.XSize = (BYTE)SizeChar.cx;
	if(SizeChar.cx % 8)	SizeChar.cx = (SizeChar.cx + 7) & 0xffff8;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人听书哪个软件好| 这里只有精品电影| 春色校园综合激情亚洲| 国产精品一区二区视频| 国内偷窥港台综合视频在线播放| 麻豆成人久久精品二区三区红| 视频精品一区二区| 日本成人在线一区| 日本中文字幕一区二区有限公司| 天天色 色综合| 日韩国产在线观看| 久久精品国产免费看久久精品| 日韩不卡手机在线v区| 免费观看在线色综合| 看电视剧不卡顿的网站| 狠狠色丁香久久婷婷综| 国产 欧美在线| av网站免费线看精品| 色综合天天综合在线视频| 欧美三级韩国三级日本三斤| 欧美丰满嫩嫩电影| 欧美一卡二卡三卡四卡| 欧美zozozo| 国产精品乱码一区二区三区软件 | 成人看片黄a免费看在线| 成人黄色在线网站| 91国产视频在线观看| 欧美精选午夜久久久乱码6080| 日韩欧美一区在线观看| 久久九九99视频| 一区在线观看视频| 亚洲超碰97人人做人人爱| 美女www一区二区| 国产成人99久久亚洲综合精品| 色婷婷综合在线| 日韩欧美中文字幕制服| 亚洲国产精品黑人久久久| 亚洲色图欧洲色图婷婷| 免费观看成人av| 国产成人自拍网| 在线免费一区三区| 欧美精品一区二区三区视频| 亚洲色图制服诱惑| 蜜桃久久av一区| 9色porny自拍视频一区二区| 欧美三级在线看| 欧美国产日韩在线观看| 午夜私人影院久久久久| 国产精品影视在线| 911精品国产一区二区在线| 久久免费视频色| 亚洲www啪成人一区二区麻豆| 国产一区二区网址| 欧洲一区二区av| 久久久久久电影| 亚洲3atv精品一区二区三区| 成人一区二区视频| 欧美一二三四区在线| 亚洲视频小说图片| 国产综合久久久久久鬼色 | 欧美一卡二卡在线观看| 亚洲三级免费观看| 国内精品国产三级国产a久久| 欧美最猛性xxxxx直播| 久久亚洲精品小早川怜子| 午夜在线成人av| 成人激情小说网站| 精品成人在线观看| 五月天久久比比资源色| 99精品视频在线免费观看| 久久久久久久久久久久久夜| 日韩国产精品久久久| av色综合久久天堂av综合| 久久久久久久久久久久电影| 日韩精品高清不卡| 欧美中文字幕一区| 亚洲人吸女人奶水| 欧美va亚洲va香蕉在线| 亚洲风情在线资源站| 91美女片黄在线观看| 亚洲国产成人一区二区三区| 国产又黄又大久久| 精品精品欲导航| 日韩国产高清影视| 欧美日韩精品福利| 亚洲欧美日韩小说| 99在线精品免费| 日本一区二区成人在线| 国产麻豆9l精品三级站| 精品欧美黑人一区二区三区| 日日摸夜夜添夜夜添精品视频| 欧美天堂亚洲电影院在线播放| 自拍偷在线精品自拍偷无码专区| 国产成a人亚洲精品| 久久精品一区二区三区四区 | 日韩一级片在线播放| 日韩精品亚洲一区二区三区免费| 欧美日韩免费视频| 亚洲一区二区欧美| 欧美日韩精品一区二区三区蜜桃| 亚洲国产成人av网| 欧美日韩在线观看一区二区| 亚洲国产日韩av| 欧美日韩成人在线| 日精品一区二区三区| 欧美一卡二卡三卡| 经典三级视频一区| 久久久精品黄色| 国产不卡免费视频| 中文字幕日韩一区| 99久久精品久久久久久清纯| 亚洲婷婷综合久久一本伊一区| 成人h精品动漫一区二区三区| 亚洲欧美在线视频| 色综合天天综合给合国产| 一区二区三区四区亚洲| 欧美色综合网站| 奇米亚洲午夜久久精品| 日韩欧美电影一二三| 国产一区二区在线影院| 国产精品私人影院| 99在线精品观看| 一区二区视频在线| 欧美人与禽zozo性伦| 日韩成人伦理电影在线观看| 精品美女被调教视频大全网站| 国产精品一区三区| 亚洲天堂中文字幕| 欧美午夜理伦三级在线观看| 麻豆久久一区二区| 欧美高清在线视频| 欧美亚洲一区二区三区四区| 蜜桃视频一区二区三区在线观看| 国产亚洲va综合人人澡精品 | 丝袜美腿成人在线| www国产成人| 91影院在线免费观看| 日本视频在线一区| 中文字幕欧美激情| 欧美高清视频在线高清观看mv色露露十八 | 久久久亚洲综合| 91伊人久久大香线蕉| 奇米亚洲午夜久久精品| 欧美国产在线观看| 在线播放国产精品二区一二区四区 | 精品在线观看视频| 中文字幕亚洲精品在线观看| 欧美日韩高清影院| 风间由美一区二区av101| 伊人色综合久久天天人手人婷| 欧美一级日韩一级| 99久久精品国产网站| 日本美女视频一区二区| 国产精品久久久久一区二区三区共| 欧美亚洲动漫另类| 岛国一区二区在线观看| 午夜免费欧美电影| 国产精品福利一区| 欧美mv日韩mv亚洲| 在线看国产一区二区| 国产曰批免费观看久久久| 亚洲一区二区在线免费观看视频| 337p日本欧洲亚洲大胆精品| 色综合天天综合网天天看片| 久久av老司机精品网站导航| 亚洲免费观看高清完整版在线观看 | 色av一区二区| 国产精品资源在线| 免费久久精品视频| 亚洲午夜激情网页| 日韩一区在线看| 精品欧美一区二区在线观看| 色94色欧美sute亚洲13| 国产精品一二三在| 免费成人美女在线观看| 亚洲激情av在线| 中文在线一区二区| 欧美成人vps| 4438成人网| 欧美在线视频不卡| av在线这里只有精品| 国产精品系列在线播放| 蜜臀精品一区二区三区在线观看| 一区二区三区不卡视频在线观看| 国产精品色在线| 中文字幕乱码久久午夜不卡| 日韩免费观看2025年上映的电影| 欧美日韩性生活| 日本道免费精品一区二区三区| 高清免费成人av| 国产成人精品aa毛片| 国内不卡的二区三区中文字幕| 蜜臀精品一区二区三区在线观看| 日韩精品亚洲一区| 五月婷婷久久综合| 亚洲午夜av在线| 亚洲bt欧美bt精品| 亚洲va欧美va国产va天堂影院| 亚洲一区二区av在线| 一区二区三区精品视频|