@@ -24,13 +24,25 @@ cc.LabelTTF._textBaseline = ["top", "middle", "bottom"];
24
24
//check the first character
25
25
cc . LabelTTF . wrapInspection = true ;
26
26
27
- //Support: English French German
28
- //Other as Oriental Language
29
- cc . LabelTTF . _wordRex = / ( [ a - z A - Z 0 - 9 Ä Ö Ü ä ö ü ß é è ç à ù ê â î ô û ] + | \S ) / ;
30
- cc . LabelTTF . _symbolRex = / ^ [ ! , . : ; } \] % \? > 、 ‘ “ 》 ? 。 , ! ] / ;
31
- cc . LabelTTF . _lastWordRex = / ( [ a - z A - Z 0 - 9 Ä Ö Ü ä ö ü ß é è ç à ù ê â î ô û ] + | \S ) $ / ;
32
- cc . LabelTTF . _lastEnglish = / [ a - z A - Z 0 - 9 Ä Ö Ü ä ö ü ß é è ç à ù ê â î ô û ] + $ / ;
33
- cc . LabelTTF . _firsrEnglish = / ^ [ a - z A - Z 0 - 9 Ä Ö Ü ä ö ü ß é è ç à ù ê â î ô û ] / ;
27
+ // These regular expressions consider a word any sequence of characters
28
+ // from these Unicode (sub)blocks:
29
+ // - Basic Latin (letters and numbers, plus the hypen-minus '-')
30
+ // - Latin-1 Supplement (accentuated letters and ¿¡ only)
31
+ // - Latin Extended-A (complete)
32
+ // - Latin Extended-B (complete)
33
+ // - IPA Extensions (complete)
34
+ // - Spacing Modifier Letters (complete)
35
+ // - Combining Diacritical Marks (Combining Grapheme Joiner excluded)
36
+ // - Greek and Coptic (complete, including reserved code points)
37
+ // - Cyrillic (complete)
38
+ // - Cyrillic Supplement (complete)
39
+ // - General Punctuation (Non-Breaking Hyphen* [U+2011] and quotation marks)
40
+ // * Note that Hyphen [U+2010] is considered a word boundary.
41
+ cc . LabelTTF . _wordRex = / ( [ a - z A - Z 0 - 9 \- ¿ ¡ « À - Ö Ø - ö ø - ʯ \u0300 - \u034e \u0350 - \u036F Ͱ - ԯ \u2011 ‵ - ‷ ‹ ⁅ ] + | \S ) / ;
42
+ cc . LabelTTF . _symbolRex = / ^ [ ! , . : ; } \] % \? > 、 ‘ “ 》 » ? 。 , ! \u2010 ′ - ‴ › ‼ ⁆ ⁇ - ⁉ ] / ;
43
+ cc . LabelTTF . _lastWordRex = / ( [ a - z A - Z 0 - 9 \- ¿ ¡ « À - Ö Ø - ö ø - ʯ \u0300 - \u034e \u0350 - \u036F Ͱ - ԯ \u2011 ‵ - ‷ ‹ ⁅ ] + | \S ) $ / ;
44
+ cc . LabelTTF . _lastEnglish = / [ a - z A - Z 0 - 9 \- ¿ ¡ « À - Ö Ø - ö ø - ʯ \u0300 - \u034e \u0350 - \u036F Ͱ - ԯ \u2011 ‵ - ‷ ‹ ⁅ ] + $ / ;
45
+ cc . LabelTTF . _firsrEnglish = / ^ [ a - z A - Z 0 - 9 \- ¿ ¡ « À - Ö Ø - ö ø - ʯ \u0300 - \u034e \u0350 - \u036F Ͱ - ԯ \u2011 ‵ - ‷ ‹ ⁅ ] / ;
34
46
35
47
( function ( ) {
36
48
cc . LabelTTF . RenderCmd = function ( ) {
0 commit comments