gdi32: Move EnumFontFamiliesEx wrappers to text.c.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-08-30 13:55:28 +02:00 committed by Alexandre Julliard
parent 62a9bae480
commit fab977f7b2
2 changed files with 52 additions and 60 deletions

View File

@ -4490,66 +4490,6 @@ INT WINAPI EnumFontFamiliesExA( HDC hDC, LPLOGFONTA plf,
return FONT_EnumFontFamiliesEx( hDC, plfW, (FONTENUMPROCW)efproc, lParam, FALSE );
}
/***********************************************************************
* EnumFontFamiliesA (GDI32.@)
*/
INT WINAPI EnumFontFamiliesA( HDC hDC, LPCSTR lpFamily,
FONTENUMPROCA efproc, LPARAM lpData )
{
LOGFONTA lf, *plf;
if (lpFamily)
{
if (!*lpFamily) return 1;
lstrcpynA( lf.lfFaceName, lpFamily, LF_FACESIZE );
lf.lfCharSet = DEFAULT_CHARSET;
lf.lfPitchAndFamily = 0;
plf = &lf;
}
else plf = NULL;
return EnumFontFamiliesExA( hDC, plf, efproc, lpData, 0 );
}
/***********************************************************************
* EnumFontFamiliesW (GDI32.@)
*/
INT WINAPI EnumFontFamiliesW( HDC hDC, LPCWSTR lpFamily,
FONTENUMPROCW efproc, LPARAM lpData )
{
LOGFONTW lf, *plf;
if (lpFamily)
{
if (!*lpFamily) return 1;
lstrcpynW( lf.lfFaceName, lpFamily, LF_FACESIZE );
lf.lfCharSet = DEFAULT_CHARSET;
lf.lfPitchAndFamily = 0;
plf = &lf;
}
else plf = NULL;
return EnumFontFamiliesExW( hDC, plf, efproc, lpData, 0 );
}
/***********************************************************************
* EnumFontsA (GDI32.@)
*/
INT WINAPI EnumFontsA( HDC hDC, LPCSTR lpName, FONTENUMPROCA efproc,
LPARAM lpData )
{
return EnumFontFamiliesA( hDC, lpName, efproc, lpData );
}
/***********************************************************************
* EnumFontsW (GDI32.@)
*/
INT WINAPI EnumFontsW( HDC hDC, LPCWSTR lpName, FONTENUMPROCW efproc,
LPARAM lpData )
{
return EnumFontFamiliesW( hDC, lpName, efproc, lpData );
}
/***********************************************************************
* NtGdiSetTextJustification (win32u.@)

View File

@ -2002,3 +2002,55 @@ BOOL WINAPI GdiRealizationInfo( HDC hdc, struct realization_info *info )
info->instance_id = ri.instance_id;
return TRUE;
}
/***********************************************************************
* EnumFontFamiliesA (GDI32.@)
*/
INT WINAPI EnumFontFamiliesA( HDC hdc, const char *family, FONTENUMPROCA efproc, LPARAM data )
{
LOGFONTA lf;
if (family)
{
if (!*family) return 1;
lstrcpynA( lf.lfFaceName, family, LF_FACESIZE );
lf.lfCharSet = DEFAULT_CHARSET;
lf.lfPitchAndFamily = 0;
}
return EnumFontFamiliesExA( hdc, family ? &lf : NULL, efproc, data, 0 );
}
/***********************************************************************
* EnumFontFamiliesW (GDI32.@)
*/
INT WINAPI EnumFontFamiliesW( HDC hdc, const WCHAR *family, FONTENUMPROCW efproc, LPARAM data )
{
LOGFONTW lf;
if (family)
{
if (!*family) return 1;
lstrcpynW( lf.lfFaceName, family, LF_FACESIZE );
lf.lfCharSet = DEFAULT_CHARSET;
lf.lfPitchAndFamily = 0;
}
return EnumFontFamiliesExW( hdc, family ? &lf : NULL, efproc, data, 0 );
}
/***********************************************************************
* EnumFontsA (GDI32.@)
*/
INT WINAPI EnumFontsA( HDC hdc, const char *name, FONTENUMPROCA efproc, LPARAM data )
{
return EnumFontFamiliesA( hdc, name, efproc, data );
}
/***********************************************************************
* EnumFontsW (GDI32.@)
*/
INT WINAPI EnumFontsW( HDC hdc, const WCHAR *name, FONTENUMPROCW efproc, LPARAM data )
{
return EnumFontFamiliesW( hdc, name, efproc, data );
}