//font 字体
namespace win.font;

 ::Gdi32 := ..raw.loadDll("Gdi32.dll")

AddFontResource =  Gdi32.api("AddFontResource","int(str filename)");
RemoveFontResource  =  Gdi32.api("RemoveFontResource","bool(str filename)");

add = function(f){
	return AddFontResource( ..io.fullpath(f) ) 
}

remove = function(f,notify){
	return RemoveFontResource( ..io.fullpath(f) )
}

sendChange = function(){
	::SendMessage( 0xFFFF/*_HWND_BROADCAST*/,0x1D/*_WM_FONTCHANGE*/); 
}


/**intellisense(win.font)
add("/__ttf") = 添加字体文件\n返回添加数目
remove("/__ttf") = 移除字体文件
sendChange() = 字体增删后使用此函数通知所有顶层窗口
end intellisense**/
