summaryrefslogtreecommitdiff
path: root/src/fl_utf8.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2015-06-15 14:28:17 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2015-06-15 14:28:17 +0000
commit16944bc383f865e857843b0dbce1ffe714c3c26d (patch)
treeff97ae2ff9098ef6b8f653e08246b818e544d3e7 /src/fl_utf8.cxx
parent5283617e6820f570132ae1978dce0fc32e7dbb1d (diff)
Fix fl_nonspacing(), explain what non-spacing characters are (STR #3159).
I also edited the mentioned README file to eliminate the most obvious error(s). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10754 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_utf8.cxx')
-rw-r--r--src/fl_utf8.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/fl_utf8.cxx b/src/fl_utf8.cxx
index 2ad718946..db6803588 100644
--- a/src/fl_utf8.cxx
+++ b/src/fl_utf8.cxx
@@ -356,15 +356,19 @@ int fl_latin12utf(const unsigned char *str, int len, char *buf)
/**
returns true if the character is non-spacing.
- \todo explain what non-spacing means.
+
+ Non-spacing characters in Unicode are typically combining marks like
+ tilde (~), diaresis (¨), or other marks that are added to a base
+ character, for instance 'a' (base character) + '¨' (combining mark) = 'ä'
+ (German Umlaut).
+
+ http://unicode.org/glossary/#base_character
+ http://unicode.org/glossary/#nonspacing_mark
+ http://unicode.org/glossary/#combining_character
*/
unsigned int fl_nonspacing(unsigned int ucs)
{
-#ifdef __APPLE__
- return (ucs==0x20); // FIXME: what does this really do?
-#else
return (unsigned int) XUtf8IsNonSpacing(ucs);
-#endif
}
#if defined(WIN32) && !defined(__CYGWIN__)