mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-24 09:14:09 +08:00
support for GB, WB, SB in break_oppos; add emoji tables
This commit is contained in:
+62
-62
@@ -5872,72 +5872,72 @@ typedef Uint32 Uchar32;
|
|||||||
/**
|
/**
|
||||||
* UCharGeneralCategory: General category of a UNICODE character.
|
* UCharGeneralCategory: General category of a UNICODE character.
|
||||||
*
|
*
|
||||||
* - UCHAR_TYPE_CONTROL: General category "Other, Control" (Cc)
|
* - UCHAR_CATEGORY_CONTROL: General category "Other, Control" (Cc)
|
||||||
* - UCHAR_TYPE_FORMAT: General category "Other, Format" (Cf)
|
* - UCHAR_CATEGORY_FORMAT: General category "Other, Format" (Cf)
|
||||||
* - UCHAR_TYPE_UNASSIGNED: General category "Other, Not Assigned" (Cn)
|
* - UCHAR_CATEGORY_UNASSIGNED: General category "Other, Not Assigned" (Cn)
|
||||||
* - UCHAR_TYPE_PRIVATE_USE: General category "Other, Private Use" (Co)
|
* - UCHAR_CATEGORY_PRIVATE_USE: General category "Other, Private Use" (Co)
|
||||||
* - UCHAR_TYPE_SURROGATE: General category "Other, Surrogate" (Cs)
|
* - UCHAR_CATEGORY_SURROGATE: General category "Other, Surrogate" (Cs)
|
||||||
* - UCHAR_TYPE_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll)
|
* - UCHAR_CATEGORY_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll)
|
||||||
* - UCHAR_TYPE_MODIFIER_LETTER: General category "Letter, Modifier" (Lm)
|
* - UCHAR_CATEGORY_MODIFIER_LETTER: General category "Letter, Modifier" (Lm)
|
||||||
* - UCHAR_TYPE_OTHER_LETTER: General category "Letter, Other" (Lo)
|
* - UCHAR_CATEGORY_OTHER_LETTER: General category "Letter, Other" (Lo)
|
||||||
* - UCHAR_TYPE_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt)
|
* - UCHAR_CATEGORY_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt)
|
||||||
* - UCHAR_TYPE_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu)
|
* - UCHAR_CATEGORY_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu)
|
||||||
* - UCHAR_TYPE_SPACING_MARK: General category "Mark, Spacing" (Mc)
|
* - UCHAR_CATEGORY_SPACING_MARK: General category "Mark, Spacing" (Mc)
|
||||||
* - UCHAR_TYPE_ENCLOSING_MARK: General category "Mark, Enclosing" (Me)
|
* - UCHAR_CATEGORY_ENCLOSING_MARK: General category "Mark, Enclosing" (Me)
|
||||||
* - UCHAR_TYPE_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn)
|
* - UCHAR_CATEGORY_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn)
|
||||||
* - UCHAR_TYPE_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd)
|
* - UCHAR_CATEGORY_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd)
|
||||||
* - UCHAR_TYPE_LETTER_NUMBER: General category "Number, Letter" (Nl)
|
* - UCHAR_CATEGORY_LETTER_NUMBER: General category "Number, Letter" (Nl)
|
||||||
* - UCHAR_TYPE_OTHER_NUMBER: General category "Number, Other" (No)
|
* - UCHAR_CATEGORY_OTHER_NUMBER: General category "Number, Other" (No)
|
||||||
* - UCHAR_TYPE_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc)
|
* - UCHAR_CATEGORY_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc)
|
||||||
* - UCHAR_TYPE_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd)
|
* - UCHAR_CATEGORY_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd)
|
||||||
* - UCHAR_TYPE_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe)
|
* - UCHAR_CATEGORY_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe)
|
||||||
* - UCHAR_TYPE_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf)
|
* - UCHAR_CATEGORY_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf)
|
||||||
* - UCHAR_TYPE_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi)
|
* - UCHAR_CATEGORY_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi)
|
||||||
* - UCHAR_TYPE_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po)
|
* - UCHAR_CATEGORY_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po)
|
||||||
* - UCHAR_TYPE_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps)
|
* - UCHAR_CATEGORY_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps)
|
||||||
* - UCHAR_TYPE_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc)
|
* - UCHAR_CATEGORY_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc)
|
||||||
* - UCHAR_TYPE_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk)
|
* - UCHAR_CATEGORY_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk)
|
||||||
* - UCHAR_TYPE_MATH_SYMBOL: General category "Symbol, Math" (Sm)
|
* - UCHAR_CATEGORY_MATH_SYMBOL: General category "Symbol, Math" (Sm)
|
||||||
* - UCHAR_TYPE_OTHER_SYMBOL: General category "Symbol, Other" (So)
|
* - UCHAR_CATEGORY_OTHER_SYMBOL: General category "Symbol, Other" (So)
|
||||||
* - UCHAR_TYPE_LINE_SEPARATOR: General category "Separator, Line" (Zl)
|
* - UCHAR_CATEGORY_LINE_SEPARATOR: General category "Separator, Line" (Zl)
|
||||||
* - UCHAR_TYPE_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp)
|
* - UCHAR_CATEGORY_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp)
|
||||||
* - UCHAR_TYPE_SPACE_SEPARATOR: General category "Separator, Space" (Zs)
|
* - UCHAR_CATEGORY_SPACE_SEPARATOR: General category "Separator, Space" (Zs)
|
||||||
*
|
*
|
||||||
* These are the possible character classifications from the
|
* These are the possible character classifications from the
|
||||||
* Unicode specification.
|
* Unicode specification.
|
||||||
* See [Unicode Character Database](http://www.unicode.org/reports/tr44/#General_Category_Values).
|
* See [Unicode Character Database](http://www.unicode.org/reports/tr44/#General_Category_Values).
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
UCHAR_TYPE_CONTROL,
|
UCHAR_CATEGORY_CONTROL,
|
||||||
UCHAR_TYPE_FORMAT,
|
UCHAR_CATEGORY_FORMAT,
|
||||||
UCHAR_TYPE_UNASSIGNED,
|
UCHAR_CATEGORY_UNASSIGNED,
|
||||||
UCHAR_TYPE_PRIVATE_USE,
|
UCHAR_CATEGORY_PRIVATE_USE,
|
||||||
UCHAR_TYPE_SURROGATE,
|
UCHAR_CATEGORY_SURROGATE,
|
||||||
UCHAR_TYPE_LOWERCASE_LETTER,
|
UCHAR_CATEGORY_LOWERCASE_LETTER,
|
||||||
UCHAR_TYPE_MODIFIER_LETTER,
|
UCHAR_CATEGORY_MODIFIER_LETTER,
|
||||||
UCHAR_TYPE_OTHER_LETTER,
|
UCHAR_CATEGORY_OTHER_LETTER,
|
||||||
UCHAR_TYPE_TITLECASE_LETTER,
|
UCHAR_CATEGORY_TITLECASE_LETTER,
|
||||||
UCHAR_TYPE_UPPERCASE_LETTER,
|
UCHAR_CATEGORY_UPPERCASE_LETTER,
|
||||||
UCHAR_TYPE_SPACING_MARK,
|
UCHAR_CATEGORY_SPACING_MARK,
|
||||||
UCHAR_TYPE_ENCLOSING_MARK,
|
UCHAR_CATEGORY_ENCLOSING_MARK,
|
||||||
UCHAR_TYPE_NON_SPACING_MARK,
|
UCHAR_CATEGORY_NON_SPACING_MARK,
|
||||||
UCHAR_TYPE_DECIMAL_NUMBER,
|
UCHAR_CATEGORY_DECIMAL_NUMBER,
|
||||||
UCHAR_TYPE_LETTER_NUMBER,
|
UCHAR_CATEGORY_LETTER_NUMBER,
|
||||||
UCHAR_TYPE_OTHER_NUMBER,
|
UCHAR_CATEGORY_OTHER_NUMBER,
|
||||||
UCHAR_TYPE_CONNECT_PUNCTUATION,
|
UCHAR_CATEGORY_CONNECT_PUNCTUATION,
|
||||||
UCHAR_TYPE_DASH_PUNCTUATION,
|
UCHAR_CATEGORY_DASH_PUNCTUATION,
|
||||||
UCHAR_TYPE_CLOSE_PUNCTUATION,
|
UCHAR_CATEGORY_CLOSE_PUNCTUATION,
|
||||||
UCHAR_TYPE_FINAL_PUNCTUATION,
|
UCHAR_CATEGORY_FINAL_PUNCTUATION,
|
||||||
UCHAR_TYPE_INITIAL_PUNCTUATION,
|
UCHAR_CATEGORY_INITIAL_PUNCTUATION,
|
||||||
UCHAR_TYPE_OTHER_PUNCTUATION,
|
UCHAR_CATEGORY_OTHER_PUNCTUATION,
|
||||||
UCHAR_TYPE_OPEN_PUNCTUATION,
|
UCHAR_CATEGORY_OPEN_PUNCTUATION,
|
||||||
UCHAR_TYPE_CURRENCY_SYMBOL,
|
UCHAR_CATEGORY_CURRENCY_SYMBOL,
|
||||||
UCHAR_TYPE_MODIFIER_SYMBOL,
|
UCHAR_CATEGORY_MODIFIER_SYMBOL,
|
||||||
UCHAR_TYPE_MATH_SYMBOL,
|
UCHAR_CATEGORY_MATH_SYMBOL,
|
||||||
UCHAR_TYPE_OTHER_SYMBOL,
|
UCHAR_CATEGORY_OTHER_SYMBOL,
|
||||||
UCHAR_TYPE_LINE_SEPARATOR,
|
UCHAR_CATEGORY_LINE_SEPARATOR,
|
||||||
UCHAR_TYPE_PARAGRAPH_SEPARATOR,
|
UCHAR_CATEGORY_PARAGRAPH_SEPARATOR,
|
||||||
UCHAR_TYPE_SPACE_SEPARATOR
|
UCHAR_CATEGORY_SPACE_SEPARATOR
|
||||||
} UCharGeneralCategory;
|
} UCharGeneralCategory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -10470,7 +10470,7 @@ static inline int GUIAPI LanguageCodeFromISO639s1Code (const char* iso639_1)
|
|||||||
/**
|
/**
|
||||||
* If set, the character is a whitespace character.
|
* If set, the character is a whitespace character.
|
||||||
*/
|
*/
|
||||||
#define BOV_WHITE_SPACE 0x8000
|
#define BOV_SPACE 0x8000
|
||||||
/**
|
/**
|
||||||
* If set, the character is a expandable space.
|
* If set, the character is a expandable space.
|
||||||
*/
|
*/
|
||||||
@@ -10518,7 +10518,7 @@ static inline int GUIAPI LanguageCodeFromISO639s1Code (const char* iso639_1)
|
|||||||
/**
|
/**
|
||||||
* If set, the glyph is the first non-sentence character in a sentence.
|
* If set, the glyph is the first non-sentence character in a sentence.
|
||||||
*/
|
*/
|
||||||
#define BOV_SB_SENTANCE_END 0x0040
|
#define BOV_SB_SENTENCE_END 0x0040
|
||||||
|
|
||||||
#define BOV_LB_MASK 0x000F
|
#define BOV_LB_MASK 0x000F
|
||||||
#define BOV_LB_BREAK_FLAG 0x0004
|
#define BOV_LB_BREAK_FLAG 0x0004
|
||||||
|
|||||||
@@ -10,11 +10,12 @@ SRC_FILES = charset.c charset-arabic.c charset-bidi.c \
|
|||||||
gbunimap.c gbkunimap.c gb18030unimap.c big5unimap.c \
|
gbunimap.c gbkunimap.c gb18030unimap.c big5unimap.c \
|
||||||
ujisunimap.c sjisunimap.c euckrunimap.c \
|
ujisunimap.c sjisunimap.c euckrunimap.c \
|
||||||
textops.c mapunitogb.c mapunitogbk.c mapunitobig5.c mapunitogb18030.c \
|
textops.c mapunitogb.c mapunitogbk.c mapunitobig5.c mapunitogb18030.c \
|
||||||
bitmapfont.c scripteasy.c
|
bitmapfont.c scripteasy.c \
|
||||||
|
unicode-emoji.c
|
||||||
|
|
||||||
HDR_FILES = charset.h rawbitmap.h varbitmap.h freetype2.h qpf.h se_minigui.h \
|
HDR_FILES = charset.h rawbitmap.h varbitmap.h freetype2.h qpf.h se_minigui.h \
|
||||||
upf.h bitmapfont.h unicode-bidi-tables.h \
|
upf.h bitmapfont.h unicode-bidi-tables.h \
|
||||||
unicode-tables.h unicode-break.h unicode-decomp.h unicode-comp.h
|
unicode-tables.h unicode-break.h unicode-decomp.h unicode-comp.h unicode-emoji-table.h
|
||||||
|
|
||||||
EXTRA_DIST = convgbmap.c jisunimap.c $(SRC_FILES) $(HDR_FILES) \
|
EXTRA_DIST = convgbmap.c jisunimap.c $(SRC_FILES) $(HDR_FILES) \
|
||||||
makefile.ng makefile.msvc
|
makefile.ng makefile.msvc
|
||||||
|
|||||||
+69
-71
@@ -43,8 +43,6 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#define DEBUG
|
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "minigui.h"
|
#include "minigui.h"
|
||||||
#include "gdi.h"
|
#include "gdi.h"
|
||||||
@@ -3490,74 +3488,74 @@ static Glyph32 utf8_char_glyph_value (const unsigned char* pre_mchar, int pre_le
|
|||||||
#include "unicode-tables.h"
|
#include "unicode-tables.h"
|
||||||
#include "unicode-break.h"
|
#include "unicode-break.h"
|
||||||
|
|
||||||
#define ATTR_TABLE(Page) (((Page) <= UCHAR_TYPE_LAST_PAGE_PART1) \
|
#define ATTR_TABLE(Page) (((Page) <= UCHAR_CATEGORY_LAST_PAGE_PART1) \
|
||||||
? attr_table_part1[Page] \
|
? attr_table_part1[Page] \
|
||||||
: attr_table_part2[(Page) - 0xe00])
|
: attr_table_part2[(Page) - 0xe00])
|
||||||
|
|
||||||
#define ATTTABLE(Page, Char) \
|
#define ATTTABLE(Page, Char) \
|
||||||
((ATTR_TABLE(Page) == UCHAR_TYPE_MAX_TABLE_INDEX) ? 0 : (attr_data[ATTR_TABLE(Page)][Char]))
|
((ATTR_TABLE(Page) == UCHAR_CATEGORY_MAX_TABLE_INDEX) ? 0 : (attr_data[ATTR_TABLE(Page)][Char]))
|
||||||
|
|
||||||
#define TTYPE_PART1(Page, Char) \
|
#define TTYPE_PART1(Page, Char) \
|
||||||
((type_table_part1[Page] >= UCHAR_TYPE_MAX_TABLE_INDEX) \
|
((type_table_part1[Page] >= UCHAR_CATEGORY_MAX_TABLE_INDEX) \
|
||||||
? (type_table_part1[Page] - UCHAR_TYPE_MAX_TABLE_INDEX) \
|
? (type_table_part1[Page] - UCHAR_CATEGORY_MAX_TABLE_INDEX) \
|
||||||
: (type_data[type_table_part1[Page]][Char]))
|
: (type_data[type_table_part1[Page]][Char]))
|
||||||
|
|
||||||
#define TTYPE_PART2(Page, Char) \
|
#define TTYPE_PART2(Page, Char) \
|
||||||
((type_table_part2[Page] >= UCHAR_TYPE_MAX_TABLE_INDEX) \
|
((type_table_part2[Page] >= UCHAR_CATEGORY_MAX_TABLE_INDEX) \
|
||||||
? (type_table_part2[Page] - UCHAR_TYPE_MAX_TABLE_INDEX) \
|
? (type_table_part2[Page] - UCHAR_CATEGORY_MAX_TABLE_INDEX) \
|
||||||
: (type_data[type_table_part2[Page]][Char]))
|
: (type_data[type_table_part2[Page]][Char]))
|
||||||
|
|
||||||
#define TYPE(Char) \
|
#define TYPE(Char) \
|
||||||
(((Char) <= UCHAR_TYPE_LAST_CHAR_PART1) \
|
(((Char) <= UCHAR_CATEGORY_LAST_CHAR_PART1) \
|
||||||
? TTYPE_PART1 ((Char) >> 8, (Char) & 0xff) \
|
? TTYPE_PART1 ((Char) >> 8, (Char) & 0xff) \
|
||||||
: (((Char) >= 0xe0000 && (Char) <= UCHAR_TYPE_LAST_CHAR) \
|
: (((Char) >= 0xe0000 && (Char) <= UCHAR_CATEGORY_LAST_CHAR) \
|
||||||
? TTYPE_PART2 (((Char) - 0xe0000) >> 8, (Char) & 0xff) \
|
? TTYPE_PART2 (((Char) - 0xe0000) >> 8, (Char) & 0xff) \
|
||||||
: UCHAR_TYPE_UNASSIGNED))
|
: UCHAR_CATEGORY_UNASSIGNED))
|
||||||
|
|
||||||
#define IS(Type, Class) (((unsigned int)1 << (Type)) & (Class))
|
#define IS(Type, Class) (((unsigned int)1 << (Type)) & (Class))
|
||||||
#define OR(Type, Rest) (((unsigned int)1 << (Type)) | (Rest))
|
#define OR(Type, Rest) (((unsigned int)1 << (Type)) | (Rest))
|
||||||
|
|
||||||
#define ISALPHA(Type) IS ((Type), \
|
#define ISALPHA(Type) IS ((Type), \
|
||||||
OR (UCHAR_TYPE_LOWERCASE_LETTER, \
|
OR (UCHAR_CATEGORY_LOWERCASE_LETTER, \
|
||||||
OR (UCHAR_TYPE_UPPERCASE_LETTER, \
|
OR (UCHAR_CATEGORY_UPPERCASE_LETTER, \
|
||||||
OR (UCHAR_TYPE_TITLECASE_LETTER, \
|
OR (UCHAR_CATEGORY_TITLECASE_LETTER, \
|
||||||
OR (UCHAR_TYPE_MODIFIER_LETTER, \
|
OR (UCHAR_CATEGORY_MODIFIER_LETTER, \
|
||||||
OR (UCHAR_TYPE_OTHER_LETTER, 0))))))
|
OR (UCHAR_CATEGORY_OTHER_LETTER, 0))))))
|
||||||
|
|
||||||
#define ISALDIGIT(Type) IS ((Type), \
|
#define ISALDIGIT(Type) IS ((Type), \
|
||||||
OR (UCHAR_TYPE_DECIMAL_NUMBER, \
|
OR (UCHAR_CATEGORY_DECIMAL_NUMBER, \
|
||||||
OR (UCHAR_TYPE_LETTER_NUMBER, \
|
OR (UCHAR_CATEGORY_LETTER_NUMBER, \
|
||||||
OR (UCHAR_TYPE_OTHER_NUMBER, \
|
OR (UCHAR_CATEGORY_OTHER_NUMBER, \
|
||||||
OR (UCHAR_TYPE_LOWERCASE_LETTER, \
|
OR (UCHAR_CATEGORY_LOWERCASE_LETTER, \
|
||||||
OR (UCHAR_TYPE_UPPERCASE_LETTER, \
|
OR (UCHAR_CATEGORY_UPPERCASE_LETTER, \
|
||||||
OR (UCHAR_TYPE_TITLECASE_LETTER, \
|
OR (UCHAR_CATEGORY_TITLECASE_LETTER, \
|
||||||
OR (UCHAR_TYPE_MODIFIER_LETTER, \
|
OR (UCHAR_CATEGORY_MODIFIER_LETTER, \
|
||||||
OR (UCHAR_TYPE_OTHER_LETTER, 0)))))))))
|
OR (UCHAR_CATEGORY_OTHER_LETTER, 0)))))))))
|
||||||
|
|
||||||
#define ISMARK(Type) IS ((Type), \
|
#define ISMARK(Type) IS ((Type), \
|
||||||
OR (UCHAR_TYPE_NON_SPACING_MARK, \
|
OR (UCHAR_CATEGORY_NON_SPACING_MARK, \
|
||||||
OR (UCHAR_TYPE_SPACING_MARK, \
|
OR (UCHAR_CATEGORY_SPACING_MARK, \
|
||||||
OR (UCHAR_TYPE_ENCLOSING_MARK, 0))))
|
OR (UCHAR_CATEGORY_ENCLOSING_MARK, 0))))
|
||||||
|
|
||||||
#define ISZEROWIDTHTYPE(Type) IS ((Type), \
|
#define ISZEROWIDTHTYPE(Type) IS ((Type), \
|
||||||
OR (UCHAR_TYPE_NON_SPACING_MARK, \
|
OR (UCHAR_CATEGORY_NON_SPACING_MARK, \
|
||||||
OR (UCHAR_TYPE_ENCLOSING_MARK, \
|
OR (UCHAR_CATEGORY_ENCLOSING_MARK, \
|
||||||
OR (UCHAR_TYPE_FORMAT, 0))))
|
OR (UCHAR_CATEGORY_FORMAT, 0))))
|
||||||
|
|
||||||
#define TPROP_PART1(Page, Char) \
|
#define TPROP_PART1(Page, Char) \
|
||||||
((break_property_table_part1[Page] >= UCHAR_TYPE_MAX_TABLE_INDEX) \
|
((break_property_table_part1[Page] >= UCHAR_CATEGORY_MAX_TABLE_INDEX) \
|
||||||
? (break_property_table_part1[Page] - UCHAR_TYPE_MAX_TABLE_INDEX) \
|
? (break_property_table_part1[Page] - UCHAR_CATEGORY_MAX_TABLE_INDEX) \
|
||||||
: (break_property_data[break_property_table_part1[Page]][Char]))
|
: (break_property_data[break_property_table_part1[Page]][Char]))
|
||||||
|
|
||||||
#define TPROP_PART2(Page, Char) \
|
#define TPROP_PART2(Page, Char) \
|
||||||
((break_property_table_part2[Page] >= UCHAR_TYPE_MAX_TABLE_INDEX) \
|
((break_property_table_part2[Page] >= UCHAR_CATEGORY_MAX_TABLE_INDEX) \
|
||||||
? (break_property_table_part2[Page] - UCHAR_TYPE_MAX_TABLE_INDEX) \
|
? (break_property_table_part2[Page] - UCHAR_CATEGORY_MAX_TABLE_INDEX) \
|
||||||
: (break_property_data[break_property_table_part2[Page]][Char]))
|
: (break_property_data[break_property_table_part2[Page]][Char]))
|
||||||
|
|
||||||
#define PROP(Char) \
|
#define PROP(Char) \
|
||||||
(((Char) <= UCHAR_TYPE_LAST_CHAR_PART1) \
|
(((Char) <= UCHAR_CATEGORY_LAST_CHAR_PART1) \
|
||||||
? TPROP_PART1 ((Char) >> 8, (Char) & 0xff) \
|
? TPROP_PART1 ((Char) >> 8, (Char) & 0xff) \
|
||||||
: (((Char) >= 0xe0000 && (Char) <= UCHAR_TYPE_LAST_CHAR) \
|
: (((Char) >= 0xe0000 && (Char) <= UCHAR_CATEGORY_LAST_CHAR) \
|
||||||
? TPROP_PART2 (((Char) - 0xe0000) >> 8, (Char) & 0xff) \
|
? TPROP_PART2 (((Char) - 0xe0000) >> 8, (Char) & 0xff) \
|
||||||
: UCHAR_BREAK_UNKNOWN))
|
: UCHAR_BREAK_UNKNOWN))
|
||||||
|
|
||||||
@@ -4449,59 +4447,59 @@ BOOL GUIAPI IsUCharAlpha(Uchar32 uc)
|
|||||||
|
|
||||||
BOOL GUIAPI IsUCharControl(Uchar32 uc)
|
BOOL GUIAPI IsUCharControl(Uchar32 uc)
|
||||||
{
|
{
|
||||||
return TYPE(uc) == UCHAR_TYPE_CONTROL;
|
return TYPE(uc) == UCHAR_CATEGORY_CONTROL;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL GUIAPI IsUCharDigit(Uchar32 uc)
|
BOOL GUIAPI IsUCharDigit(Uchar32 uc)
|
||||||
{
|
{
|
||||||
return TYPE(uc) == UCHAR_TYPE_DECIMAL_NUMBER;
|
return TYPE(uc) == UCHAR_CATEGORY_DECIMAL_NUMBER;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL GUIAPI IsUCharGraph(Uchar32 uc)
|
BOOL GUIAPI IsUCharGraph(Uchar32 uc)
|
||||||
{
|
{
|
||||||
return !IS (TYPE(uc),
|
return !IS (TYPE(uc),
|
||||||
OR (UCHAR_TYPE_CONTROL,
|
OR (UCHAR_CATEGORY_CONTROL,
|
||||||
OR (UCHAR_TYPE_FORMAT,
|
OR (UCHAR_CATEGORY_FORMAT,
|
||||||
OR (UCHAR_TYPE_UNASSIGNED,
|
OR (UCHAR_CATEGORY_UNASSIGNED,
|
||||||
OR (UCHAR_TYPE_SURROGATE,
|
OR (UCHAR_CATEGORY_SURROGATE,
|
||||||
OR (UCHAR_TYPE_SPACE_SEPARATOR,
|
OR (UCHAR_CATEGORY_SPACE_SEPARATOR,
|
||||||
0))))));
|
0))))));
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL GUIAPI IsUCharLowercase(Uchar32 uc)
|
BOOL GUIAPI IsUCharLowercase(Uchar32 uc)
|
||||||
{
|
{
|
||||||
return TYPE(uc) == UCHAR_TYPE_LOWERCASE_LETTER;
|
return TYPE(uc) == UCHAR_CATEGORY_LOWERCASE_LETTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL GUIAPI IsUCharPrint(Uchar32 uc)
|
BOOL GUIAPI IsUCharPrint(Uchar32 uc)
|
||||||
{
|
{
|
||||||
return !IS (TYPE(uc),
|
return !IS (TYPE(uc),
|
||||||
OR (UCHAR_TYPE_CONTROL,
|
OR (UCHAR_CATEGORY_CONTROL,
|
||||||
OR (UCHAR_TYPE_FORMAT,
|
OR (UCHAR_CATEGORY_FORMAT,
|
||||||
OR (UCHAR_TYPE_UNASSIGNED,
|
OR (UCHAR_CATEGORY_UNASSIGNED,
|
||||||
OR (UCHAR_TYPE_SURROGATE,
|
OR (UCHAR_CATEGORY_SURROGATE,
|
||||||
0)))));
|
0)))));
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL GUIAPI IsUCharUppercase(Uchar32 uc)
|
BOOL GUIAPI IsUCharUppercase(Uchar32 uc)
|
||||||
{
|
{
|
||||||
return TYPE(uc) == UCHAR_TYPE_UPPERCASE_LETTER;
|
return TYPE(uc) == UCHAR_CATEGORY_UPPERCASE_LETTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL GUIAPI IsUCharPunct(Uchar32 uc)
|
BOOL GUIAPI IsUCharPunct(Uchar32 uc)
|
||||||
{
|
{
|
||||||
return IS (TYPE(uc),
|
return IS (TYPE(uc),
|
||||||
OR (UCHAR_TYPE_CONNECT_PUNCTUATION,
|
OR (UCHAR_CATEGORY_CONNECT_PUNCTUATION,
|
||||||
OR (UCHAR_TYPE_DASH_PUNCTUATION,
|
OR (UCHAR_CATEGORY_DASH_PUNCTUATION,
|
||||||
OR (UCHAR_TYPE_CLOSE_PUNCTUATION,
|
OR (UCHAR_CATEGORY_CLOSE_PUNCTUATION,
|
||||||
OR (UCHAR_TYPE_FINAL_PUNCTUATION,
|
OR (UCHAR_CATEGORY_FINAL_PUNCTUATION,
|
||||||
OR (UCHAR_TYPE_INITIAL_PUNCTUATION,
|
OR (UCHAR_CATEGORY_INITIAL_PUNCTUATION,
|
||||||
OR (UCHAR_TYPE_OTHER_PUNCTUATION,
|
OR (UCHAR_CATEGORY_OTHER_PUNCTUATION,
|
||||||
OR (UCHAR_TYPE_OPEN_PUNCTUATION,
|
OR (UCHAR_CATEGORY_OPEN_PUNCTUATION,
|
||||||
OR (UCHAR_TYPE_CURRENCY_SYMBOL,
|
OR (UCHAR_CATEGORY_CURRENCY_SYMBOL,
|
||||||
OR (UCHAR_TYPE_MODIFIER_SYMBOL,
|
OR (UCHAR_CATEGORY_MODIFIER_SYMBOL,
|
||||||
OR (UCHAR_TYPE_MATH_SYMBOL,
|
OR (UCHAR_CATEGORY_MATH_SYMBOL,
|
||||||
OR (UCHAR_TYPE_OTHER_SYMBOL,
|
OR (UCHAR_CATEGORY_OTHER_SYMBOL,
|
||||||
0))))))))))));
|
0))))))))))));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4517,9 +4515,9 @@ BOOL GUIAPI IsUCharSpace(Uchar32 uc)
|
|||||||
|
|
||||||
default: {
|
default: {
|
||||||
if (IS (TYPE(uc),
|
if (IS (TYPE(uc),
|
||||||
OR (UCHAR_TYPE_SPACE_SEPARATOR,
|
OR (UCHAR_CATEGORY_SPACE_SEPARATOR,
|
||||||
OR (UCHAR_TYPE_LINE_SEPARATOR,
|
OR (UCHAR_CATEGORY_LINE_SEPARATOR,
|
||||||
OR (UCHAR_TYPE_PARAGRAPH_SEPARATOR,
|
OR (UCHAR_CATEGORY_PARAGRAPH_SEPARATOR,
|
||||||
0)))))
|
0)))))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -4551,14 +4549,14 @@ BOOL GUIAPI IsUCharXDigit(Uchar32 uc)
|
|||||||
{
|
{
|
||||||
return ((uc >= 'a' && uc <= 'f')
|
return ((uc >= 'a' && uc <= 'f')
|
||||||
|| (uc >= 'A' && uc <= 'F')
|
|| (uc >= 'A' && uc <= 'F')
|
||||||
|| (TYPE(uc) == UCHAR_TYPE_DECIMAL_NUMBER));
|
|| (TYPE(uc) == UCHAR_CATEGORY_DECIMAL_NUMBER));
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL GUIAPI IsUCharDefined(Uchar32 uc)
|
BOOL GUIAPI IsUCharDefined(Uchar32 uc)
|
||||||
{
|
{
|
||||||
return !IS (TYPE(uc),
|
return !IS (TYPE(uc),
|
||||||
OR (UCHAR_TYPE_UNASSIGNED,
|
OR (UCHAR_CATEGORY_UNASSIGNED,
|
||||||
OR (UCHAR_TYPE_SURROGATE,
|
OR (UCHAR_CATEGORY_SURROGATE,
|
||||||
0)));
|
0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4641,7 +4639,7 @@ BOOL GUIAPI IsUCharWideCJK (Uchar32 uc)
|
|||||||
Uchar32 UCharToUpper (Uchar32 uc)
|
Uchar32 UCharToUpper (Uchar32 uc)
|
||||||
{
|
{
|
||||||
int t = TYPE (uc);
|
int t = TYPE (uc);
|
||||||
if (t == UCHAR_TYPE_LOWERCASE_LETTER) {
|
if (t == UCHAR_CATEGORY_LOWERCASE_LETTER) {
|
||||||
Uchar32 val = ATTTABLE (uc >> 8, uc & 0xff);
|
Uchar32 val = ATTTABLE (uc >> 8, uc & 0xff);
|
||||||
if (val >= 0x1000000) {
|
if (val >= 0x1000000) {
|
||||||
const unsigned char *p = special_case_table + val - 0x1000000;
|
const unsigned char *p = special_case_table + val - 0x1000000;
|
||||||
@@ -4653,7 +4651,7 @@ Uchar32 UCharToUpper (Uchar32 uc)
|
|||||||
*/
|
*/
|
||||||
return val ? val : uc;
|
return val ? val : uc;
|
||||||
}
|
}
|
||||||
else if (t == UCHAR_TYPE_TITLECASE_LETTER) {
|
else if (t == UCHAR_CATEGORY_TITLECASE_LETTER) {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i = 0; i < TABLESIZE (title_table); ++i) {
|
for (i = 0; i < TABLESIZE (title_table); ++i) {
|
||||||
if (title_table[i][0] == uc)
|
if (title_table[i][0] == uc)
|
||||||
@@ -4670,7 +4668,7 @@ Uchar32 UCharToUpper (Uchar32 uc)
|
|||||||
Uchar32 GUIAPI UCharToLower (Uchar32 uc)
|
Uchar32 GUIAPI UCharToLower (Uchar32 uc)
|
||||||
{
|
{
|
||||||
int t = TYPE (uc);
|
int t = TYPE (uc);
|
||||||
if (t == UCHAR_TYPE_UPPERCASE_LETTER) {
|
if (t == UCHAR_CATEGORY_UPPERCASE_LETTER) {
|
||||||
Uchar32 val = ATTTABLE (uc >> 8, uc & 0xff);
|
Uchar32 val = ATTTABLE (uc >> 8, uc & 0xff);
|
||||||
if (val >= 0x1000000) {
|
if (val >= 0x1000000) {
|
||||||
const unsigned char *p = special_case_table + val - 0x1000000;
|
const unsigned char *p = special_case_table + val - 0x1000000;
|
||||||
@@ -4682,7 +4680,7 @@ Uchar32 GUIAPI UCharToLower (Uchar32 uc)
|
|||||||
return val ? val : uc;
|
return val ? val : uc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (t == UCHAR_TYPE_TITLECASE_LETTER) {
|
else if (t == UCHAR_CATEGORY_TITLECASE_LETTER) {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i = 0; i < TABLESIZE (title_table); ++i) {
|
for (i = 0; i < TABLESIZE (title_table); ++i) {
|
||||||
if (title_table[i][0] == uc)
|
if (title_table[i][0] == uc)
|
||||||
@@ -4704,7 +4702,7 @@ Uchar32 GUIAPI UCharToTitle (Uchar32 uc)
|
|||||||
return title_table[i][0];
|
return title_table[i][0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TYPE (uc) == UCHAR_TYPE_LOWERCASE_LETTER)
|
if (TYPE (uc) == UCHAR_CATEGORY_LOWERCASE_LETTER)
|
||||||
return UCharToUpper (uc);
|
return UCharToUpper (uc);
|
||||||
|
|
||||||
return uc;
|
return uc;
|
||||||
|
|||||||
+1367
-1367
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,107 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of MiniGUI, a mature cross-platform windowing
|
||||||
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
|
* and smart IoT devices.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
||||||
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* Or,
|
||||||
|
*
|
||||||
|
* As this program is a library, any link to this program must follow
|
||||||
|
* GNU General Public License version 3 (GPLv3). If you cannot accept
|
||||||
|
* GPLv3, you need to be licensed from FMSoft.
|
||||||
|
*
|
||||||
|
* If you have got a commercial license of this program, please use it
|
||||||
|
* under the terms and conditions of the commercial license.
|
||||||
|
*
|
||||||
|
* For more information about the commercial license, please refer to
|
||||||
|
* <http://www.minigui.com/en/about/licensing-policy/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Some operators to check Emoji.
|
||||||
|
** Implementation of the functions is based on some code from LGPL'd Pango.
|
||||||
|
**
|
||||||
|
** Created by WEI Yongming at 2019/02/26
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "minigui.h"
|
||||||
|
#include "gdi.h"
|
||||||
|
|
||||||
|
#ifdef _MGCHARSET_UNICODE
|
||||||
|
|
||||||
|
#include "unicode-ops.h"
|
||||||
|
#include "unicode-emoji-table.h"
|
||||||
|
|
||||||
|
static int interval_compare(const void *key, const void *elt)
|
||||||
|
{
|
||||||
|
Uchar32 c = (Uchar32)(intptr_t)key;
|
||||||
|
struct Interval *interval = (struct Interval *)elt;
|
||||||
|
|
||||||
|
if (c < interval->start)
|
||||||
|
return -1;
|
||||||
|
if (c > interval->end)
|
||||||
|
return +1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define DEFINE_unicode_is_(name) \
|
||||||
|
BOOL _unicode_is_##name (Uchar32 ch) \
|
||||||
|
{ \
|
||||||
|
if (bsearch ((void*)((intptr_t)ch), \
|
||||||
|
_unicode_##name##_table, \
|
||||||
|
TABLESIZE (_unicode_##name##_table), \
|
||||||
|
sizeof _unicode_##name##_table[0], \
|
||||||
|
interval_compare)) \
|
||||||
|
return TRUE; \
|
||||||
|
\
|
||||||
|
return FALSE; \
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFINE_unicode_is_(emoji)
|
||||||
|
DEFINE_unicode_is_(emoji_presentation)
|
||||||
|
DEFINE_unicode_is_(emoji_modifier)
|
||||||
|
DEFINE_unicode_is_(emoji_modifier_base)
|
||||||
|
DEFINE_unicode_is_(emoji_extended_pictographic)
|
||||||
|
|
||||||
|
BOOL _unicode_is_emoji_text_default(Uchar32 ch)
|
||||||
|
{
|
||||||
|
return _unicode_is_emoji(ch) && !_unicode_is_emoji_presentation(ch);
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL _unicode_is_emoji_emoji_default(Uchar32 ch)
|
||||||
|
{
|
||||||
|
return _unicode_is_emoji_presentation(ch);
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL _unicode_is_emoji_keycap_base(Uchar32 ch)
|
||||||
|
{
|
||||||
|
return (ch >= '0' && ch <= '9') || ch == '#' || ch == '*';
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL _unicode_is_regional_indicator(Uchar32 ch)
|
||||||
|
{
|
||||||
|
return (ch >= 0x1F1E6 && ch <= 0x1F1FF);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* _MGCHARSET_UNICODE */
|
||||||
+15422
-15422
File diff suppressed because it is too large
Load Diff
Executable
+70
@@ -0,0 +1,70 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
from __future__ import print_function, division, absolute_import
|
||||||
|
import sys
|
||||||
|
import os.path
|
||||||
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
if len (sys.argv) != 2:
|
||||||
|
print("usage: ./gen-emoji-table.py emoji-data.txt", file=sys.stderr)
|
||||||
|
sys.exit (1)
|
||||||
|
|
||||||
|
f = open(sys.argv[1])
|
||||||
|
header = [f.readline () for _ in range(10)]
|
||||||
|
|
||||||
|
ranges = OrderedDict()
|
||||||
|
for line in f.readlines():
|
||||||
|
line = line.strip()
|
||||||
|
if not line or line[0] == '#':
|
||||||
|
continue
|
||||||
|
rang, typ = [s.strip() for s in line.split('#')[0].split(';')[:2]]
|
||||||
|
|
||||||
|
rang = [int(s, 16) for s in rang.split('..')]
|
||||||
|
if len(rang) > 1:
|
||||||
|
start, end = rang
|
||||||
|
else:
|
||||||
|
start = end = rang[0]
|
||||||
|
|
||||||
|
if typ not in ranges:
|
||||||
|
ranges[typ] = []
|
||||||
|
if ranges[typ] and ranges[typ][-1][1] == start - 1:
|
||||||
|
ranges[typ][-1] = (ranges[typ][-1][0], end)
|
||||||
|
else:
|
||||||
|
ranges[typ].append((start, end))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
print("/* == Start of generated table == */")
|
||||||
|
print("/*")
|
||||||
|
print(" * The following tables are generated by running:")
|
||||||
|
print(" *")
|
||||||
|
print(" * ./gen-emoji-table.py emoji-data.txt")
|
||||||
|
print(" *")
|
||||||
|
print(" * on file with this header:")
|
||||||
|
print(" *")
|
||||||
|
for l in header:
|
||||||
|
print(" * %s" % (l.strip()))
|
||||||
|
print(" */")
|
||||||
|
print()
|
||||||
|
print("#ifndef UNICODE_EMOJI_TABLE_H")
|
||||||
|
print("#define UNICODE_EMOJI_TABLE_H")
|
||||||
|
print()
|
||||||
|
print("struct Interval {\n Uchar32 start, end;\n};")
|
||||||
|
|
||||||
|
for typ,s in ranges.items():
|
||||||
|
if typ not in ['emoji',
|
||||||
|
'emoji_presentation',
|
||||||
|
'emoji_modifier',
|
||||||
|
'emoji_modifier_base',
|
||||||
|
'extended_pictographic']: continue
|
||||||
|
print()
|
||||||
|
print("static const struct Interval _unicode_%s_table[] =" % typ)
|
||||||
|
print("{")
|
||||||
|
for pair in sorted(s):
|
||||||
|
print(" {0x%04X, 0x%04X}," % pair)
|
||||||
|
print("};")
|
||||||
|
|
||||||
|
print()
|
||||||
|
print("#endif /* UNICODE_EMOJI_TABLE_H */")
|
||||||
|
print()
|
||||||
|
print("/* == End of generated table == */")
|
||||||
@@ -73,38 +73,38 @@ $FOLDING_MAPPING = 2;
|
|||||||
%mappings =
|
%mappings =
|
||||||
(
|
(
|
||||||
# Normative.
|
# Normative.
|
||||||
'Lu' => "UCHAR_TYPE_UPPERCASE_LETTER",
|
'Lu' => "UCHAR_CATEGORY_UPPERCASE_LETTER",
|
||||||
'Ll' => "UCHAR_TYPE_LOWERCASE_LETTER",
|
'Ll' => "UCHAR_CATEGORY_LOWERCASE_LETTER",
|
||||||
'Lt' => "UCHAR_TYPE_TITLECASE_LETTER",
|
'Lt' => "UCHAR_CATEGORY_TITLECASE_LETTER",
|
||||||
'Mn' => "UCHAR_TYPE_NON_SPACING_MARK",
|
'Mn' => "UCHAR_CATEGORY_NON_SPACING_MARK",
|
||||||
'Mc' => "UCHAR_TYPE_SPACING_MARK",
|
'Mc' => "UCHAR_CATEGORY_SPACING_MARK",
|
||||||
'Me' => "UCHAR_TYPE_ENCLOSING_MARK",
|
'Me' => "UCHAR_CATEGORY_ENCLOSING_MARK",
|
||||||
'Nd' => "UCHAR_TYPE_DECIMAL_NUMBER",
|
'Nd' => "UCHAR_CATEGORY_DECIMAL_NUMBER",
|
||||||
'Nl' => "UCHAR_TYPE_LETTER_NUMBER",
|
'Nl' => "UCHAR_CATEGORY_LETTER_NUMBER",
|
||||||
'No' => "UCHAR_TYPE_OTHER_NUMBER",
|
'No' => "UCHAR_CATEGORY_OTHER_NUMBER",
|
||||||
'Zs' => "UCHAR_TYPE_SPACE_SEPARATOR",
|
'Zs' => "UCHAR_CATEGORY_SPACE_SEPARATOR",
|
||||||
'Zl' => "UCHAR_TYPE_LINE_SEPARATOR",
|
'Zl' => "UCHAR_CATEGORY_LINE_SEPARATOR",
|
||||||
'Zp' => "UCHAR_TYPE_PARAGRAPH_SEPARATOR",
|
'Zp' => "UCHAR_CATEGORY_PARAGRAPH_SEPARATOR",
|
||||||
'Cc' => "UCHAR_TYPE_CONTROL",
|
'Cc' => "UCHAR_CATEGORY_CONTROL",
|
||||||
'Cf' => "UCHAR_TYPE_FORMAT",
|
'Cf' => "UCHAR_CATEGORY_FORMAT",
|
||||||
'Cs' => "UCHAR_TYPE_SURROGATE",
|
'Cs' => "UCHAR_CATEGORY_SURROGATE",
|
||||||
'Co' => "UCHAR_TYPE_PRIVATE_USE",
|
'Co' => "UCHAR_CATEGORY_PRIVATE_USE",
|
||||||
'Cn' => "UCHAR_TYPE_UNASSIGNED",
|
'Cn' => "UCHAR_CATEGORY_UNASSIGNED",
|
||||||
|
|
||||||
# Informative.
|
# Informative.
|
||||||
'Lm' => "UCHAR_TYPE_MODIFIER_LETTER",
|
'Lm' => "UCHAR_CATEGORY_MODIFIER_LETTER",
|
||||||
'Lo' => "UCHAR_TYPE_OTHER_LETTER",
|
'Lo' => "UCHAR_CATEGORY_OTHER_LETTER",
|
||||||
'Pc' => "UCHAR_TYPE_CONNECT_PUNCTUATION",
|
'Pc' => "UCHAR_CATEGORY_CONNECT_PUNCTUATION",
|
||||||
'Pd' => "UCHAR_TYPE_DASH_PUNCTUATION",
|
'Pd' => "UCHAR_CATEGORY_DASH_PUNCTUATION",
|
||||||
'Ps' => "UCHAR_TYPE_OPEN_PUNCTUATION",
|
'Ps' => "UCHAR_CATEGORY_OPEN_PUNCTUATION",
|
||||||
'Pe' => "UCHAR_TYPE_CLOSE_PUNCTUATION",
|
'Pe' => "UCHAR_CATEGORY_CLOSE_PUNCTUATION",
|
||||||
'Pi' => "UCHAR_TYPE_INITIAL_PUNCTUATION",
|
'Pi' => "UCHAR_CATEGORY_INITIAL_PUNCTUATION",
|
||||||
'Pf' => "UCHAR_TYPE_FINAL_PUNCTUATION",
|
'Pf' => "UCHAR_CATEGORY_FINAL_PUNCTUATION",
|
||||||
'Po' => "UCHAR_TYPE_OTHER_PUNCTUATION",
|
'Po' => "UCHAR_CATEGORY_OTHER_PUNCTUATION",
|
||||||
'Sm' => "UCHAR_TYPE_MATH_SYMBOL",
|
'Sm' => "UCHAR_CATEGORY_MATH_SYMBOL",
|
||||||
'Sc' => "UCHAR_TYPE_CURRENCY_SYMBOL",
|
'Sc' => "UCHAR_CATEGORY_CURRENCY_SYMBOL",
|
||||||
'Sk' => "UCHAR_TYPE_MODIFIER_SYMBOL",
|
'Sk' => "UCHAR_CATEGORY_MODIFIER_SYMBOL",
|
||||||
'So' => "UCHAR_TYPE_OTHER_SYMBOL"
|
'So' => "UCHAR_CATEGORY_OTHER_SYMBOL"
|
||||||
);
|
);
|
||||||
|
|
||||||
%break_mappings =
|
%break_mappings =
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
noinst_HEADERS = \
|
noinst_HEADERS = \
|
||||||
accelkey.h bidi.h bitmap.h cliprect.h ctrlclass.h \
|
accelkey.h bidi.h bitmap.h cliprect.h ctrlclass.h \
|
||||||
cursor.h dc.h event.h list.h element.h \
|
cursor.h dc.h event.h list.h element.h \
|
||||||
ial.h inline.h internals.h zorder.h menu.h misc.h \
|
ial.h inline.h internals.h zorder.h menu.h misc.h \
|
||||||
msgstr.h sysfont.h timer.h devfont.h fontname.h \
|
msgstr.h sysfont.h timer.h devfont.h fontname.h \
|
||||||
readbmp.h icon.h blockheap.h \
|
readbmp.h icon.h blockheap.h \
|
||||||
ourhdr.h client.h server.h sharedres.h sockio.h drawsemop.h \
|
ourhdr.h client.h server.h sharedres.h sockio.h drawsemop.h \
|
||||||
gal.h newgal.h memops.h incoreres.h sysres.h clipboard.h \
|
gal.h newgal.h memops.h incoreres.h sysres.h clipboard.h \
|
||||||
md5.h glyph.h license.h mgsock.h
|
md5.h glyph.h license.h mgsock.h unicode-ops.h
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of MiniGUI, a mature cross-platform windowing
|
||||||
|
* and Graphics User Interface (GUI) support system for embedded systems
|
||||||
|
* and smart IoT devices.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd.
|
||||||
|
* Copyright (C) 1998~2002, WEI Yongming
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* Or,
|
||||||
|
*
|
||||||
|
* As this program is a library, any link to this program must follow
|
||||||
|
* GNU General Public License version 3 (GPLv3). If you cannot accept
|
||||||
|
* GPLv3, you need to be licensed from FMSoft.
|
||||||
|
*
|
||||||
|
* If you have got a commercial license of this program, please use it
|
||||||
|
* under the terms and conditions of the commercial license.
|
||||||
|
*
|
||||||
|
* For more information about the commercial license, please refer to
|
||||||
|
* <http://www.minigui.com/en/about/licensing-policy/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
** unicode-ops.h: Declaration of Unicode operators.
|
||||||
|
**
|
||||||
|
** Current maintainer: Wei Yongming.
|
||||||
|
**
|
||||||
|
** Create date: 2019/02/26
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GUI_UNICODE_OPS_H
|
||||||
|
#define GUI_UNICODE_OPS_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
BOOL _unicode_is_emoji(Uchar32 ch);
|
||||||
|
BOOL _unicode_is_emoji_presentation(Uchar32 ch);
|
||||||
|
BOOL _unicode_is_emoji_modifier(Uchar32 ch);
|
||||||
|
BOOL _unicode_is_emoji_modifier_base(Uchar32 ch);
|
||||||
|
BOOL _unicode_is_emoji_extended_pictographic(Uchar32 ch);
|
||||||
|
|
||||||
|
BOOL _unicode_is_emoji_text_default(Uchar32 ch);
|
||||||
|
BOOL _unicode_is_emoji_emoji_default(Uchar32 ch);
|
||||||
|
BOOL _unicode_is_emoji_keycap_base(Uchar32 ch);
|
||||||
|
BOOL _unicode_is_regional_indicator(Uchar32 ch);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif // GUI_UNICODE_OPS_H
|
||||||
|
|
||||||
+1327
-351
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user