Nikolay Sivov : dwrite: Use public macro to define OpenType tags.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Oct 7 14:49:56 CDT 2014
Module: wine
Branch: master
Commit: 3b1e8bf824b7506ad718271f2dbbac084b1e2c7f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3b1e8bf824b7506ad718271f2dbbac084b1e2c7f
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Tue Oct 7 09:23:26 2014 +0400
dwrite: Use public macro to define OpenType tags.
---
dlls/dwrite/dwrite_private.h | 4 ----
dlls/dwrite/font.c | 12 ++++--------
include/dwrite.idl | 6 ++++++
3 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h
index 5a2b5a3..736292e 100644
--- a/dlls/dwrite/dwrite_private.h
+++ b/dlls/dwrite/dwrite_private.h
@@ -19,10 +19,6 @@
#include "wine/debug.h"
#include "wine/unicode.h"
-#define DWRITE_MAKE_OPENTYPE_TAG(ch0, ch1, ch2, ch3) \
- ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
- ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24))
-
static inline void *heap_alloc(size_t len)
{
return HeapAlloc(GetProcessHeap(), 0, len);
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c
index 923996b..def64ce 100644
--- a/dlls/dwrite/font.c
+++ b/dlls/dwrite/font.c
@@ -25,14 +25,10 @@
WINE_DEFAULT_DEBUG_CHANNEL(dwrite);
-#define MS_MAKE_TAG(ch0, ch1, ch2, ch3) \
- ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
- ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24))
-
-#define MS_HEAD_TAG MS_MAKE_TAG('h','e','a','d')
-#define MS_OS2_TAG MS_MAKE_TAG('O','S','/','2')
-#define MS_POST_TAG MS_MAKE_TAG('p','o','s','t')
-#define MS_CMAP_TAG MS_MAKE_TAG('c','m','a','p')
+#define MS_HEAD_TAG DWRITE_MAKE_OPENTYPE_TAG('h','e','a','d')
+#define MS_OS2_TAG DWRITE_MAKE_OPENTYPE_TAG('O','S','/','2')
+#define MS_POST_TAG DWRITE_MAKE_OPENTYPE_TAG('p','o','s','t')
+#define MS_CMAP_TAG DWRITE_MAKE_OPENTYPE_TAG('c','m','a','p')
struct dwrite_fontface_data {
LONG ref;
diff --git a/include/dwrite.idl b/include/dwrite.idl
index bc530fc..1888215 100644
--- a/include/dwrite.idl
+++ b/include/dwrite.idl
@@ -222,6 +222,12 @@ typedef enum DWRITE_LINE_SPACING_METHOD
DWRITE_LINE_SPACING_METHOD_UNIFORM
} DWRITE_LINE_SPACING_METHOD;
+cpp_quote("#define DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d) ( \\")
+cpp_quote(" ((UINT32)(UINT8)(d) << 24) | \\")
+cpp_quote(" ((UINT32)(UINT8)(c) << 16) | \\")
+cpp_quote(" ((UINT32)(UINT8)(b) << 8) | \\")
+cpp_quote(" (UINT32)(UINT8)(a))")
+
typedef enum DWRITE_FONT_FEATURE_TAG
{
DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS = 0x63726661, /* 'afrc' */
More information about the wine-cvs
mailing list