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

int  WINAPI
GetTextFace(HDC hdc, int nCount, LPTSTR lpFaceName)
{
	char name[LF_FULLFACESIZE];	/* 64 */
	int n;

	if(win_useunicode)
		return GetTextFaceW(hdc, nCount, lpFaceName);

	n = GetTextFaceA(hdc, sizeof(name), name);
	if(n == 0)
		return 0;
	win_utf2wstrn(lpFaceName, nCount, name);
	return win_wstrlen(lpFaceName);
}



syntax highlighted by Code2HTML, v. 0.9.1