summaryrefslogtreecommitdiffstats
path: root/scene/gui/label.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <red@kyoko>2015-05-21 15:02:49 -0300
committerJuan Linietsky <red@kyoko>2015-05-21 15:02:49 -0300
commitbb5d46bb113bca3204db7678eb69900f159e8087 (patch)
treecd34e10d67a196d217559ab8d4973b8f5bc4ccde /scene/gui/label.cpp
parent4b8745ad63409cf14b02735981ee35d2f794421c (diff)
parent6049479a99f66b620d59498a76ed9f2c3891f4c8 (diff)
downloadredot-engine-bb5d46bb113bca3204db7678eb69900f159e8087.tar.gz
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'scene/gui/label.cpp')
-rw-r--r--scene/gui/label.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index dac21275dc..27d0f568a2 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -378,7 +378,11 @@ void Label::regenerate_word_cache() {
if (uppercase)
current=String::char_uppercase(current);
- bool not_latin = current>=33 && (current < 65||current >90) && (current<97||current>122) && (current<48||current>57);
+ // ranges taken from http://www.unicodemap.org/
+ // if your language is not well supported, consider helping improve
+ // the unicode support in Godot.
+ bool separatable = (current>=0x2E08 && current<=0xFAFF) || (current>=0xFE30 && current<=0xFE4F);
+ //current>=33 && (current < 65||current >90) && (current<97||current>122) && (current<48||current>57);
bool insert_newline=false;
int char_width;
@@ -433,8 +437,8 @@ void Label::regenerate_word_cache() {
}
- if ((autowrap && (line_width >= width) && ((last && last->char_pos >= 0) || not_latin)) || insert_newline) {
- if (not_latin) {
+ if ((autowrap && (line_width >= width) && ((last && last->char_pos >= 0) || separatable)) || insert_newline) {
+ if (separatable) {
if (current_word_size>0) {
WordCache *wc = memnew( WordCache );
if (word_cache) {