¤Þ¤º¡¢Ê¸»úÎó¤ÎÃæ¤Ë¡Ö\¡×¤ò´Þ¤á¤¿¤¤¤Î¤Ê¤é¡¢¡Ö\\¡×¤È2¸ÄϢ³¤Ç½ñ¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¡£
¤½¤ì¤«¤é¡¢¥Õ¥©¥ó¥È¤Î¥¤¥ó¥¹¥È¡¼¥ë¾ì½ê¤Ç¤¹¤¬¡¢
¡ÖC:\Users\¥æ¡¼¥¶¡¼Ì¾\AppData\Local\Microsoft\Windows\Fonts¡×¤È
¡ÖC:\Windows\Fonts¡×¤Î2²Õ½ê¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢¥æ¡¼¥¶¡¼¥Õ¥©¥ë¥À¤À¤±¤ò
¥Á¥§¥Ã¥¯¤·¤Æ¤â¤½¤ì¤À¤±¤Ç¤Ï¤ê¤Þ¤»¤ó¡£
¡Ê¼ÂºÝ»ä¤Î´Ä¶¤Ç¤â¡ÖC:\Users\¥æ¡¼¥¶¡¼Ì¾\AppData\Local\Microsoft\Windows¡×¤Ë
¡¡Fonts¤È¤¤¤¦¥Õ¥©¥ë¥À¤Ï¤¢¤ê¤Þ¤»¤ó¤Ç¤·¤¿¡Ë
¤Þ¤¿¡¢¥æ¡¼¥¶¡¼Ì¾¤ËUnicode¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ç¤¹¤È¡¢
hsp3utf¤òÍøÍѤ·¤Ê¤¤¤È¡¢ÉáÄ̤Τä¤êÊý¤Ç¤Ï¥Õ¥©¥ë¥À¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó¡£
¡Ê¥¢¥¯¥»¥¹¤Ç¤¤Ê¤¤¤³¤È¤â¤Ê¤¤¤¬¡¢WinAPI¤ò¶î»È¤¹¤ë¤Ê¤É¡¢¤À¤¤¤ÖÏä¬ÌÌÅݤˤʤë¡Ë
¡Ö¥Õ¥©¥ó¥È¤òƱº¤·¡¢¤½¤Î¥Õ¥©¥ó¥È¤ò»È¤¤¤¿¤¤¡×¤È¤¤¤¦¤³¤È¤Ê¤é¡¢
»ä¤¬²áµî¤Ë¡Ö¥¤¥ó¥¹¥È¡¼¥ë¤Ê¤·¤Ç¥Õ¥©¥ó¥È¤ò»ÈÍѤ¹¤ë¥â¥¸¥å¡¼¥ë¡×¤ò
ºî¤ê¤Þ¤·¤¿¤Î¤Ç¡¢¤½¤ì¤òÍøÍѤ¹¤ë¤Î¤Ï¤É¤¦¤Ç¤·¤ç¤¦¤«¡©
//¥Õ¥©¥ó¥È¤ò¥¤¥ó¥¹¥È¡¼¥ë¤»¤º¤Ë»ÈÍѤ¹¤ë¥â¥¸¥å¡¼¥ë
#include "gdi32.as"
#module
#const use_fonts 10 //ÅÐÏ¿¤Ç¤¤ë¥Õ¥©¥ó¥È¤ÎºÇÂç¿ô(Êѹ¹²Äǽ)
#const global FR_PRIVATE 0x10 //¡ÖÅÐÏ¿¤·¤¿¥Õ¥©¥ó¥È¤ò¤³¤Î¥×¥í¥°¥é¥à¤À¤±¤Ç»ÈÍѤ¹¤ë¡×¥ª¥×¥·¥ç¥ó
#const global FR_NOT_ENUM 0x20 //¡ÖÅÐÏ¿¤·¤¿¥Õ¥©¥ó¥È¤¬¥Õ¥©¥ó¥ÈÁªÂò¥À¥¤¥¢¥í¥°Åù¤Çɽ¼¨¤µ¤ì¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¡×¥ª¥×¥·¥ç¥ó
#deffunc font_file_init
l_flag=0
dim l_opt,use_fonts
sdim l_name,64,use_fonts
return
//font_file p1,p2,p3
//»ØÄꤷ¤¿¥Õ¥¡¥¤¥ë̾¤Î¥Õ¥©¥ó¥È¤ò°ì»þŪ¤Ë»È¤¨¤ë¤è¤¦¤ËÅÐÏ¿¤¹¤ë¡£
//p1¤Ï¥Õ¥©¥ó¥È¤Î¥Õ¥¡¥¤¥ë̾¡£
//p2¤ò1¤Ë¤·¤¿¾ì¹ç¤Ï¤³¤ì¤Þ¤Ç¤ÎÅÐÏ¿¤ò²ò½ü¡£(¾Êά»þ¤Ï0)
//p3¤ÏFR_PRIVATE¤«FR_NOT_ENUM¤«¡¢¤â¤·¤¯¤Ï0¤«¤ò»ØÄê¡£(¾Êά»þ¤ÏFR_PRIVATE¤ÈFR_NOT_ENUM¤ÎξÊý¤È¤â͸ú)
#define global font_file(%1,%2=0,%3=0x30) _font_file %1,%2,%3
#deffunc _font_file str file,int cl_flag,int opt
if cl_flag : font_clean
if l_flag>=use_fonts : return 0
l_opt(l_flag)=opt
l_name(l_flag)=file
l_flag++
AddFontResourceEx file,opt,0
if stat=0 : l_flag--
return stat
#deffunc font_clean onexit
repeat
if l_flag<=0 : break
l_flag--
RemoveFontResourceEx l_name(l_flag),l_opt(l_flag),0
loop
return
#global
font_file_init //¢«ºÇ½é¤Ë¼Â¹Ô¤¹¤ë
//°Ê²¼¡¢»ÈÍÑÎã
//¥µ¥Ö¥Õ¥©¥ë¥À¡Öfont¡×¤Ë¡Ök8x12S.ttf¡×¤¬¤¢¤ë¤â¤Î¤È¤¹¤ë¡£
font_file "font\\k8x12S.ttf" //¥Õ¥©¥ó¥È¤Î¥Õ¥¡¥¤¥ë̾¤ò»ØÄê
font "k8x12S",20
mes "ÅìµþÆõöµö²Ä¶É"