Sync changes from upstream repository

Co-authored-by: Andrew le Bihan <andy@mcneel.com>
Co-authored-by: Brian Gillespie <brian@mcneel.com>
Co-authored-by: Dale Lear <dalelear@mcneel.com>
Co-authored-by: Giulio Piacentino <giulio@mcneel.com>
Co-authored-by: Greg Arden <greg@mcneel.com>
Co-authored-by: Lars <lars@mcneel.com>
Co-authored-by: Lowell <lowell@mcneelcom>
Co-authored-by: Nathan Letwory <nathan@mcneel.com>
Co-authored-by: Pierre Cuvilliers <pierre@mcneel.com>
Co-authored-by: Tim Hemmelman <tim@mcneel.com>
This commit is contained in:
Bozo The Builder
2020-12-16 05:49:44 -08:00
parent 990401a8f5
commit 488533eb7a
54 changed files with 4026 additions and 898 deletions

View File

@@ -29,6 +29,28 @@ int ON_IsValidUnicodeCodePoint(ON__UINT32 u)
return (u < 0xD800 || (u >= 0xE000 && u <= 0x10FFFF));
}
int ON_IsUnicodeSpaceCodePoint(
ON__UINT32 u
)
{
// Additional code points may be added in the future.
// The goal is to detect code points that typically separate words
// and which should not be at the beginning or end of a word.
return
ON_UnicodeCodePoint::ON_Space == u
|| ON_UnicodeCodePoint::ON_NoBreakSpace == u
|| ON_UnicodeCodePoint::ON_NarrowNoBreakSpace == u
|| ON_UnicodeCodePoint::ON_ZeroWidthSpace == u
;
}
int ON_IsUnicodeC1ControlCodePoint(
ON__UINT32 u
)
{
return (u >= 0x0080 && u <= 0x009F);
}
int ON_IsValidUTF32Value(
ON__UINT32 c
)