Implement Wine port EnumLogFontExW2A.

svn path=/trunk/; revision=26460
This commit is contained in:
James Tabor 2007-04-22 12:46:26 +00:00
parent 8c39ab1ac8
commit e808f1ee16
2 changed files with 24 additions and 0 deletions

View file

@ -157,6 +157,12 @@ LogFontW2A(
CONST LOGFONTW *pW
);
VOID
STDCALL
EnumLogFontExW2A(
LPENUMLOGFONTEXA fontA,
CONST ENUMLOGFONTEXW *fontW );
/* FIXME: Put in some public header */
UINT
WINAPI

View file

@ -383,3 +383,21 @@ LogFontW2A(LPLOGFONTA pA, CONST LOGFONTW *pW)
#undef COPYN
#undef COPYS
}
VOID
STDCALL
EnumLogFontExW2A( LPENUMLOGFONTEXA fontA, CONST ENUMLOGFONTEXW *fontW )
{
LogFontW2A( (LPLOGFONTA)fontA, (CONST LOGFONTW *)fontW );
WideCharToMultiByte( CP_ACP, 0, fontW->elfFullName, -1,
(LPSTR) fontA->elfFullName, LF_FULLFACESIZE, NULL, NULL );
fontA->elfFullName[LF_FULLFACESIZE-1] = '\0';
WideCharToMultiByte( CP_ACP, 0, fontW->elfStyle, -1,
(LPSTR) fontA->elfStyle, LF_FACESIZE, NULL, NULL );
fontA->elfStyle[LF_FACESIZE-1] = '\0';
WideCharToMultiByte( CP_ACP, 0, fontW->elfScript, -1,
(LPSTR) fontA->elfScript, LF_FACESIZE, NULL, NULL );
fontA->elfScript[LF_FACESIZE-1] = '\0';
}