//Ends the terminal, destroy everything int curses_destroy(void) { DeleteObject(font); WinDestroy(); RemoveFontResourceExA("data\\termfont",FR_PRIVATE,NULL);//Unload it return 1; }
//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; };
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; }
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; }