#include <9pm/windows.h>
#include <9pm/u.h>
#include <9pm/libc.h>

HFONT  WINAPI
CreateFontIndirect(LOGFONT *lf)
{
	LOGFONTA lfa;

	if(win_useunicode)
		return CreateFontIndirectW(lf);

	memmove(&lfa, lf, (long)&((LOGFONT*)0)->lfFaceName[0]);
	win_wstr2utfn(lfa.lfFaceName, LF_FACESIZE, lf->lfFaceName);
	return CreateFontIndirectA(&lfa);
}
