示例#1
0
//Ends the terminal, destroy everything
int curses_destroy(void)
{
    DeleteObject(font);
    WinDestroy();
    RemoveFontResourceExA("data\\termfont",FR_PRIVATE,NULL);//Unload it
    return 1;
}
示例#2
0
//Ends the terminal, destroy everything
int endwin(void)
{
    DeleteObject(font);
    WinDestroy();
    delete _windows;
    BOOL b = RemoveFontResourceExA("data\\termfont",FR_PRIVATE,NULL);//Unload it
    return 1;
};
示例#3
0
HFONT WINAPI CreateFontFromFileA(int cHeight, int cWidth, int cEscapement, int cOrientation, int cWeight, DWORD bItalic, DWORD bUnderline, DWORD bStrikeOut, DWORD iCharSet, DWORD iOutPrecision, DWORD iClipPrecision, DWORD iQuality, DWORD iPitchAndFamily, LPCSTR lpszFontName, LPCTSTR lpszFontRes)
{
    HFONT hFont;

    if (AddFontResourceExA(lpszFontName, FR_PRIVATE, 0) == 0)
        return NULL;

    hFont = CreateFontA(cHeight, cWidth, cEscapement, cOrientation, cWeight, bItalic, bUnderline, bStrikeOut, iCharSet, iOutPrecision, iClipPrecision, iQuality, iPitchAndFamily, lpszFontRes);
    if (hFont == NULL)
    {
        RemoveFontResourceExA(lpszFontName, FR_PRIVATE, 0);
    }

    return hFont;
}
示例#4
0
文件: w32dc.cpp 项目: kant/livecode
bool MCScreenDC::unloadfont(const char *p_path, bool p_globally, void *r_loaded_font_handle)
{
    bool t_success = true;
    DWORD t_private = NULL;
    
    if (p_globally)
        t_private = FR_PRIVATE;
    
    if (t_success)
		t_success = (RemoveFontResourceExA(p_path, t_private, 0) != 0);
    
	if (t_success && p_globally)
		PostMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0);
    
	return t_success;
}