Check for invalid unicode in fallback.

CFStringCreateWithBytes will return nullptr if the raw string passed is
not valid in the encoding specified. It turns out that in UTF32 the
values between 0xD800 and 0xDFFF and above 0x10FFFF are invalid.

Bug: chromium:1057692
Change-Id: Ic3984d113106cbf8ef393048a97ccc906fb89966
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274679
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2 files changed