Module: wine Branch: master Commit: 6dfa2e3740fd791d546d4a5c9b2f20dc428de9e7 URL: https://source.winehq.org/git/wine.git/?a=commit;h=6dfa2e3740fd791d546d4a5c9...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Aug 30 13:54:44 2021 +0200
gdi32: Use NtGdiGetFontFileData for GetFontFileData.
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 | 9 +++++---- dlls/gdi32/text.c | 9 +++++++++ 2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index 90673fb5d24..de3787988d8 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -6753,9 +6753,10 @@ BOOL WINAPI NtGdiGetRasterizerCaps( RASTERIZER_STATUS *status, UINT size ) }
/************************************************************************* - * GetFontFileData (GDI32.@) + * NtGdiGetFontFileData (win32u.@) */ -BOOL WINAPI GetFontFileData( DWORD instance_id, DWORD file_index, UINT64 offset, void *buff, DWORD buff_size ) +BOOL WINAPI NtGdiGetFontFileData( DWORD instance_id, DWORD file_index, UINT64 *offset, + void *buff, DWORD buff_size ) { struct gdi_font *font; DWORD tag = 0, size; @@ -6767,8 +6768,8 @@ BOOL WINAPI GetFontFileData( DWORD instance_id, DWORD file_index, UINT64 offset, { if (font->ttc_item_offset) tag = MS_TTCF_TAG; size = font_funcs->get_font_data( font, tag, 0, NULL, 0 ); - if (size != GDI_ERROR && size >= buff_size && offset <= size - buff_size) - ret = font_funcs->get_font_data( font, tag, offset, buff, buff_size ) != GDI_ERROR; + if (size != GDI_ERROR && size >= buff_size && *offset <= size - buff_size) + ret = font_funcs->get_font_data( font, tag, *offset, buff, buff_size ) != GDI_ERROR; else SetLastError( ERROR_INVALID_PARAMETER ); } diff --git a/dlls/gdi32/text.c b/dlls/gdi32/text.c index 98840af111d..22c67e79c71 100644 --- a/dlls/gdi32/text.c +++ b/dlls/gdi32/text.c @@ -1968,3 +1968,12 @@ BOOL WINAPI EnableEUDC( BOOL enable ) FIXME( "(%d): stub\n", enable ); return FALSE; } + +/************************************************************************* + * GetFontFileData (GDI32.@) + */ +BOOL WINAPI GetFontFileData( DWORD instance_id, DWORD file_index, UINT64 offset, + void *buff, DWORD buff_size ) +{ + return NtGdiGetFontFileData( instance_id, file_index, &offset, buff, buff_size ); +}