[cairo-commit] src/cairo-unicode.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 18 23:37:41 UTC 2022


 src/cairo-unicode.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit b41cfe3fe0909bec8586d7a541dbb4eb5133b2be
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed May 18 17:35:38 2022 -0600

    [unicode] Non-characters are allowed in Unicode strings
    
    https://www.unicode.org/faq/private_use.html#nonchar_codes
    
    Fixes https://github.com/harfbuzz/harfbuzz/issues/3590

diff --git a/src/cairo-unicode.c b/src/cairo-unicode.c
index 966ae84b5..b96a3a235 100644
--- a/src/cairo-unicode.c
+++ b/src/cairo-unicode.c
@@ -99,9 +99,7 @@
 
 #define UNICODE_VALID(Char)                   \
     ((Char) < 0x110000 &&                     \
-     (((Char) & 0xFFFFF800) != 0xD800) &&     \
-     ((Char) < 0xFDD0 || (Char) > 0xFDEF) &&  \
-     ((Char) & 0xFFFE) != 0xFFFE)
+     (((Char) & 0xFFFFF800) != 0xD800))
 
 static const char utf8_skip_data[256] = {
     1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,


More information about the cairo-commit mailing list