summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorRyan Schmidt <git@ryandesign.com>2018-08-04 12:20:02 -0500
committerRyan Schmidt <git@ryandesign.com>2018-08-04 12:20:02 -0500
commitdce7ba63ed8b0567f674ade72da827d4a4c1b603 (patch)
tree1826540e8cb17d99088be90765b05dd570512810 /pango
parent67471cbfe24cd4418e9e97837ac85207f0d974de (diff)
downloadpango-dce7ba63ed8b0567f674ade72da827d4a4c1b603.tar.gz
Fix build failure on Mac OS X 10.5 and earlier
Provides definitions of CFStringIsSurrogateHighCharacter, CFStringIsSurrogateLowCharacter and CFStringGetLongCharacterForSurrogatePair. Closes #263
Diffstat (limited to 'pango')
-rw-r--r--pango/pangocoretext-shape.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/pango/pangocoretext-shape.c b/pango/pangocoretext-shape.c
index 1f46d8a0..061279a9 100644
--- a/pango/pangocoretext-shape.c
+++ b/pango/pangocoretext-shape.c
@@ -29,6 +29,20 @@
#include "pangocoretext-private.h"
#include "pango-impl-utils.h"
+#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < 1060
+CF_INLINE Boolean CFStringIsSurrogateHighCharacter(UniChar character) {
+ return ((character >= 0xD800UL) && (character <= 0xDBFFUL) ? true : false);
+}
+
+CF_INLINE Boolean CFStringIsSurrogateLowCharacter(UniChar character) {
+ return ((character >= 0xDC00UL) && (character <= 0xDFFFUL) ? true : false);
+}
+
+CF_INLINE UTF32Char CFStringGetLongCharacterForSurrogatePair(UniChar surrogateHigh, UniChar surrogateLow) {
+ return ((surrogateHigh - 0xD800UL) << 10) + (surrogateLow - 0xDC00UL) + 0x0010000UL;
+}
+#endif
+
static void
set_glyph (PangoFont *font,
PangoGlyphString *glyphs,