[PATCH v2 9/9] gdi32: Use ntgdi name for GetFontData.

Huw Davies huw at codeweavers.com
Fri Aug 27 07:51:56 CDT 2021


From: Jacek Caban <jacek at codeweavers.com>

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/gdi32/font.c               |  5 ++---
 dlls/gdi32/gdi32.spec           |  2 +-
 dlls/gdi32/uniscribe/opentype.c |  6 +++---
 dlls/gdi32/uniscribe/shape.c    | 12 ++++++------
 dlls/gdi32/uniscribe/usp10.c    |  4 ++--
 include/ntgdi.h                 |  1 +
 6 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index b65f1e54bee..c5e36ef584b 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -6045,7 +6045,7 @@ BOOL WINAPI TranslateCharsetInfo(
 }
 
 /*************************************************************************
- * GetFontData [GDI32.@]
+ *           NtGdiGetFontData    (win32u.@)
  *
  * Retrieve data for TrueType font.
  *
@@ -6059,8 +6059,7 @@ BOOL WINAPI TranslateCharsetInfo(
  * Calls SetLastError()
  *
  */
-DWORD WINAPI GetFontData(HDC hdc, DWORD table, DWORD offset,
-    LPVOID buffer, DWORD length)
+DWORD WINAPI NtGdiGetFontData( HDC hdc, DWORD table, DWORD offset, void *buffer, DWORD length )
 {
     DC *dc = get_dc_ptr(hdc);
     PHYSDEV dev;
diff --git a/dlls/gdi32/gdi32.spec b/dlls/gdi32/gdi32.spec
index 7862a5c3077..309e9e1ccbe 100644
--- a/dlls/gdi32/gdi32.spec
+++ b/dlls/gdi32/gdi32.spec
@@ -289,7 +289,7 @@
 # @ stub GetEnhMetaFilePixelFormat
 @ stdcall GetEnhMetaFileW(wstr)
 # @ stub GetFontAssocStatus
-@ stdcall GetFontData(long long long ptr long)
+@ stdcall GetFontData(long long long ptr long) NtGdiGetFontData
 @ stdcall GetFontFileData(long long int64 ptr long)
 @ stdcall GetFontFileInfo(long long ptr long ptr)
 @ stdcall GetFontLanguageInfo(long)
diff --git a/dlls/gdi32/uniscribe/opentype.c b/dlls/gdi32/uniscribe/opentype.c
index a6ce76072d9..a6dbc6c4d28 100644
--- a/dlls/gdi32/uniscribe/opentype.c
+++ b/dlls/gdi32/uniscribe/opentype.c
@@ -23,7 +23,7 @@
 
 #include "windef.h"
 #include "winbase.h"
-#include "wingdi.h"
+#include "ntgdi.h"
 #include "winuser.h"
 #include "winnls.h"
 #include "usp10.h"
@@ -632,11 +632,11 @@ static VOID *load_CMAP_format12_table(HDC hdc, ScriptCache *psc)
 
     if (!psc->CMAP_Table)
     {
-        length = GetFontData(hdc, CMAP_TAG , 0, NULL, 0);
+        length = NtGdiGetFontData(hdc, CMAP_TAG , 0, NULL, 0);
         if (length != GDI_ERROR)
         {
             psc->CMAP_Table = heap_alloc(length);
-            GetFontData(hdc, CMAP_TAG , 0, psc->CMAP_Table, length);
+            NtGdiGetFontData(hdc, CMAP_TAG , 0, psc->CMAP_Table, length);
             TRACE("Loaded cmap table of %i bytes\n",length);
         }
         else
diff --git a/dlls/gdi32/uniscribe/shape.c b/dlls/gdi32/uniscribe/shape.c
index d65476f67b4..709924597d3 100644
--- a/dlls/gdi32/uniscribe/shape.c
+++ b/dlls/gdi32/uniscribe/shape.c
@@ -669,11 +669,11 @@ static INT apply_GSUB_feature_to_glyph(HDC hdc, SCRIPT_ANALYSIS *psa, ScriptCach
 static VOID *load_gsub_table(HDC hdc)
 {
     VOID* GSUB_Table = NULL;
-    int length = GetFontData(hdc, MS_MAKE_TAG('G', 'S', 'U', 'B'), 0, NULL, 0);
+    int length = NtGdiGetFontData(hdc, MS_MAKE_TAG('G', 'S', 'U', 'B'), 0, NULL, 0);
     if (length != GDI_ERROR)
     {
         GSUB_Table = heap_alloc(length);
-        GetFontData(hdc, MS_MAKE_TAG('G', 'S', 'U', 'B'), 0, GSUB_Table, length);
+        NtGdiGetFontData(hdc, MS_MAKE_TAG('G', 'S', 'U', 'B'), 0, GSUB_Table, length);
         TRACE("Loaded GSUB table of %i bytes\n",length);
     }
     return GSUB_Table;
@@ -682,11 +682,11 @@ static VOID *load_gsub_table(HDC hdc)
 static VOID *load_gpos_table(HDC hdc)
 {
     VOID* GPOS_Table = NULL;
-    int length = GetFontData(hdc, MS_MAKE_TAG('G', 'P', 'O', 'S'), 0, NULL, 0);
+    int length = NtGdiGetFontData(hdc, MS_MAKE_TAG('G', 'P', 'O', 'S'), 0, NULL, 0);
     if (length != GDI_ERROR)
     {
         GPOS_Table = heap_alloc(length);
-        GetFontData(hdc, MS_MAKE_TAG('G', 'P', 'O', 'S'), 0, GPOS_Table, length);
+        NtGdiGetFontData(hdc, MS_MAKE_TAG('G', 'P', 'O', 'S'), 0, GPOS_Table, length);
         TRACE("Loaded GPOS table of %i bytes\n",length);
     }
     return GPOS_Table;
@@ -695,11 +695,11 @@ static VOID *load_gpos_table(HDC hdc)
 static VOID *load_gdef_table(HDC hdc)
 {
     VOID* GDEF_Table = NULL;
-    int length = GetFontData(hdc, MS_MAKE_TAG('G', 'D', 'E', 'F'), 0, NULL, 0);
+    int length = NtGdiGetFontData(hdc, MS_MAKE_TAG('G', 'D', 'E', 'F'), 0, NULL, 0);
     if (length != GDI_ERROR)
     {
         GDEF_Table = heap_alloc(length);
-        GetFontData(hdc, MS_MAKE_TAG('G', 'D', 'E', 'F'), 0, GDEF_Table, length);
+        NtGdiGetFontData(hdc, MS_MAKE_TAG('G', 'D', 'E', 'F'), 0, GDEF_Table, length);
         TRACE("Loaded GDEF table of %i bytes\n",length);
     }
     return GDEF_Table;
diff --git a/dlls/gdi32/uniscribe/usp10.c b/dlls/gdi32/uniscribe/usp10.c
index 50f38f957b2..32fae22c816 100644
--- a/dlls/gdi32/uniscribe/usp10.c
+++ b/dlls/gdi32/uniscribe/usp10.c
@@ -30,7 +30,7 @@
 
 #include "windef.h"
 #include "winbase.h"
-#include "wingdi.h"
+#include "ntgdi.h"
 #include "winuser.h"
 #include "winnls.h"
 #include "winreg.h"
@@ -822,7 +822,7 @@ static HRESULT init_script_cache(const HDC hdc, SCRIPT_CACHE *psc)
         sc->otm->otmSize = size;
         GetOutlineTextMetricsW(hdc, size, sc->otm);
     }
-    sc->sfnt = (GetFontData(hdc, MS_MAKE_TAG('h','e','a','d'), 0, NULL, 0)!=GDI_ERROR);
+    sc->sfnt = (NtGdiGetFontData(hdc, MS_MAKE_TAG('h','e','a','d'), 0, NULL, 0) != GDI_ERROR);
     if (!set_cache_font_properties(hdc, sc))
     {
         heap_free(sc);
diff --git a/include/ntgdi.h b/include/ntgdi.h
index f9ad9da2060..995c2017b55 100644
--- a/include/ntgdi.h
+++ b/include/ntgdi.h
@@ -242,6 +242,7 @@ BOOL     WINAPI NtGdiGetDCDword( HDC hdc, UINT method, DWORD *result );
 BOOL     WINAPI NtGdiGetDCPoint( HDC hdc, UINT method, POINT *result );
 INT      WINAPI NtGdiGetDeviceCaps( HDC hdc, INT cap );
 BOOL     WINAPI NtGdiGetDeviceGammaRamp( HDC hdc, void *ptr );
+DWORD    WINAPI NtGdiGetFontData( HDC hdc, DWORD table, DWORD offset, void *buffer, DWORD length );
 DWORD    WINAPI NtGdiGetGlyphOutlineW( HDC hdc, UINT ch, UINT format, GLYPHMETRICS *metrics,
                                        DWORD size, void *buffer, const MAT2 *mat2,
                                        BOOL ignore_rotation );
-- 
2.23.0




More information about the wine-devel mailing list