diff --git a/include/gdi.h b/include/gdi.h index 49fc222a..23eb1797 100644 --- a/include/gdi.h +++ b/include/gdi.h @@ -5774,8 +5774,8 @@ typedef struct _WORDINFO WORDINFO; #define MAX_LEN_MCHAR 6 -typedef unsigned short UChar16; -typedef int UChar32; +typedef Uint16 UChar16; +typedef Uint32 UChar32; #define MCHAR_TYPE_NOSPACING_MARK 0x0001 #define MCHAR_TYPE_ABOVE_MARK 0x0002 @@ -8880,7 +8880,7 @@ MG_EXPORT void GUIAPI DestroyBMPFont (DEVFONT* dev_font); * @{ */ -typedef int Glyph32; +typedef Uint32 Glyph32; /** * \def INV_GLYPH_VALUE diff --git a/src/control/bidiedit.c b/src/control/bidiedit.c index c9843aa4..24953f6e 100644 --- a/src/control/bidiedit.c +++ b/src/control/bidiedit.c @@ -475,7 +475,7 @@ static void slePaint (HWND hWnd, HDC hdc, PBIDISLEDITDATA sled) int startx = 0; int* ranges = NULL; int nr_ranges = 0; - int* glyph_string = GLYPHS; + Glyph32* glyph_string = GLYPHS; int i = 0; int* p = NULL; diff --git a/src/control/bidiedit_impl.h b/src/control/bidiedit_impl.h index 88165dd6..bf88ef44 100644 --- a/src/control/bidiedit_impl.h +++ b/src/control/bidiedit_impl.h @@ -45,14 +45,13 @@ extern "C" { #endif typedef struct _GLYPHBUF -{ - GLYPHMAPINFO* glyph_map; /* glyph info array */ - int* glyphs; /* glyph array */ +{ + GLYPHMAPINFO* glyph_map; /* glyph info array */ + Glyph32* glyphs; /* glyph array */ int glyphs_len; /* glyph array len or buffer used size */ - int blocksize; /* block size, a block is an allocate unit */ - int glyphs_buffsize; /* glyph string buffer size */ - int glyphmap_buffsize; /* glyph map buffer size */ + int glyphs_buffsize; /* glyph string buffer size */ + int glyphmap_buffsize; /* glyph map buffer size */ } GLYPHBUF; typedef struct tagBIDISLEDITDATA @@ -95,7 +94,7 @@ static inline void* glyphbuf_alloc (GLYPHBUF* glyph_buff, int len, int block_size) { glyph_buff->glyphs_buffsize = (len + (block_size - len % block_size)) - * sizeof (int); + * sizeof (Glyph32); glyph_buff->glyphs = malloc (glyph_buff->glyphs_buffsize); glyph_buff->glyphmap_buffsize = (len + (block_size - len % block_size)) @@ -122,7 +121,7 @@ static inline void* glyphbuf_realloc (GLYPHBUF *glyph_buff, int len) len * sizeof(int) < glyph_buff->glyphs_buffsize - glyph_buff->blocksize) { /* realloc glyph string mem */ glyph_buff->glyphs_buffsize = (len + (glyph_buff->blocksize - - len % glyph_buff->blocksize))* sizeof(int); + len % glyph_buff->blocksize))* sizeof(Glyph32); glyph_buff->glyphs = realloc (glyph_buff->glyphs, glyph_buff->glyphs_buffsize); diff --git a/src/newgdi/bidi.c b/src/newgdi/bidi.c index f5e0da4b..ba5592f5 100644 --- a/src/newgdi/bidi.c +++ b/src/newgdi/bidi.c @@ -128,7 +128,7 @@ static int inline get_glyph_advance_in_dc (PDC pdc, Glyph32 glyph_value) } -static int jump_vowels_ltr (PDC pdc, Glyph32* glyphs, int glyph_num, int* biggest_vowel) +static int jump_vowels_ltr (PDC pdc, Glyph32* glyphs, int glyph_num, Glyph32* biggest_vowel) { int i = 0; int max_advance = 0; diff --git a/src/newgdi/glyph-css.c b/src/newgdi/glyph-css.c index d81215ef..6922e58f 100644 --- a/src/newgdi/glyph-css.c +++ b/src/newgdi/glyph-css.c @@ -36,7 +36,12 @@ ** glyph-css.c: The implementation of APIs which conform to the specifiction ** of CSS 3 ** -** Create date: 2019/01/16 +** Reference: +** +** https://www.w3.org/TR/css-text-3/ +** https://www.w3.org/TR/css-writing-modes-3/ +** +** Create by WEI Yongming at 2019/01/16 */ #include