示例#1
0
文件: combo.c 项目: 340211173/wine
static BOOL is_font_installed(const char *name)
{
    HDC hdc = GetDC(NULL);
    BOOL ret = !EnumFontFamiliesA(hdc, name, is_font_installed_proc, 0);
    ReleaseDC(NULL, hdc);
    return ret;
}
示例#2
0
文件: rebar.c 项目: GYGit/reactos
static BOOL is_font_installed(const char *name)
{
    HDC hdc = GetDC(0);
    BOOL ret = FALSE;

    if(!EnumFontFamiliesA(hdc, name, is_font_installed_proc, 0))
        ret = TRUE;

    ReleaseDC(0, hdc);
    return ret;
}
示例#3
0
void MCFontlist::getfontsizes(const char *fname, MCExecPoint &ep)
{
	ep.clear();
	if (MCnoui)
		return;
	epptr = &ep;
	nfonts = 0;
	MCScreenDC *pms = (MCScreenDC *)MCscreen;
	HDC hdc = pms->getsrchdc();
	EnumFontFamiliesA(hdc, fname, (FONTENUMPROCA)MyFontFamProc, FQ_SIZES);
	delete sizes;
	sizes = NULL;
}
示例#4
0
void MCFontlist::getfontstyles(const char *fname, uint2 fsize, MCExecPoint &ep)
{
	ep.clear();
	if (MCnoui)
		return;
	ep.setstaticcstring("plain\nbold\nitalic\nbold-italic");
#ifdef FOR_TRUE_TYPE_ONLY

	epptr = &ep;
	nfonts = 0;
	char mappedName[LF_FACESIZE];
	mapfacename(mappedName, fname);
	MCScreenDC *pms = (MCScreenDC *)MCscreen;
	HDC hdc = pms->getmemsrchdc();
	EnumFontFamiliesA(hdc, mappedName, (FONTENUMPROC)MyFontFamProc, FQ_STYLES);
	ep.lower();
#endif
}
示例#5
0
void MCFontlist::getfontnames(MCExecPoint &ep, char *type)
{
	ep.clear();
	if (MCnoui)
		return;
	epptr = &ep;
	nfonts = 0;
	MCScreenDC *pms = (MCScreenDC *)MCscreen;
	HDC hdc;
#ifdef _DESKTOP
	// MM-2013-09-13:: [[ RefactorGraphics ]] Tweak to get things compiling for server.
	if (!MCU_strncasecmp(type, "Printer", strlen(type) + 1))
		hdc = static_cast<MCWindowsPrinter *>(MCsystemprinter) -> GetDC();
	else
#endif
		hdc = pms->getsrchdc();
	EnumFontFamiliesA(hdc, NULL, (FONTENUMPROCA)MyFontFamProc, FQ_NAMES);
}