Exemplo n.º 1
0
void
/*ARGSUSED*/
free_font_store(wfList *object, void *item)
{
	struct font_store *ele = (struct font_store *) item;
	nffmi_release(ele->fmi, NULL);
	delete ele;
}
Exemplo n.º 2
0
int
wf_releaseFmis(struct nffmi **fmis)
{
	if (!fmis)
	{
		return (-1);
	}
	while (*fmis)
	{
		nffmi_release(*fmis, NULL);
		fmis++;
	}
	return (0);	
}
Exemplo n.º 3
0
// this function allocate space, the destructor for m_pRenderableFont,
// need to free the space.
int	CyaFont::CreateNetscapeFont(
	MWContext *pContext,
	HDC		hDC, 
    const char    *FmiName,
    const char    *FmiCharset,
    const char    *FmiEncoding,
    int     FmiWeight,
    int     FmiPitch,
    int     FmiStyle,
	int		FmiUnderline,
	int     FmiOverstrike,
    int     FmiPixelPerInchX,
    int     FmiPixelPerInchY,
	double	fontHeight				// not a fmi field
	)
{
   	struct nffmi    *pWantedFmi;
	int				reCode;

	// remember the lfPitchAndFamily, cannot get it from FMI easily
	m_pitch = FmiPitch;

    pWantedFmi = nffbu_CreateFontMatchInfo( 
		theGlobalNSFont.getBrokerUtilityInterface(),
        FmiName,
        FmiCharset,
        FmiEncoding,
        FmiWeight,
		FmiPitch,
        FmiStyle,
		FmiUnderline,
		FmiOverstrike,
		FmiPixelPerInchX,                          
        FmiPixelPerInchY,                          
		NULL				/* exception */
		);

	if (pWantedFmi == NULL)
		return( FONTERR_CreateFontMatchInfoFailed );
	
	reCode = CreateNetscapeFontWithFMI(pContext, hDC, pWantedFmi, fontHeight );
    nffmi_release( pWantedFmi, NULL);

	return( reCode); 

}