Module: wine Branch: master Commit: fab977f7b27793dd52d3cbce02b0a1e89d61d93a URL: https://source.winehq.org/git/wine.git/?a=commit;h=fab977f7b27793dd52d3cbce0...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Aug 30 13:55:28 2021 +0200
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
---
dlls/gdi32/font.c | 60 ------------------------------------------------------- dlls/gdi32/text.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 60 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 7ba6b3466c4..b3321d5fbf7 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -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.@) diff --git a/dlls/gdi32/text.c b/dlls/gdi32/text.c index 117f5921c9d..f41cf67a5db 100644 --- a/dlls/gdi32/text.c +++ b/dlls/gdi32/text.c @@ -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 ); +}