dwrite: Use public macro to define OpenType tags.

This commit is contained in:
Nikolay Sivov 2014-10-07 09:23:26 +04:00 committed by Alexandre Julliard
parent 07dc8b66e4
commit 3b1e8bf824
3 changed files with 10 additions and 12 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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' */