[HarfBuzz] harfbuzz: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Tue Aug 12 16:26:44 PDT 2014
src/hb-coretext.cc | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 20076cc41e673c31305fcb58d37b3b292fd35f83
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Aug 12 19:26:35 2014 -0400
[coretext] Add version guards for kCTLanguageAttributeName
diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc
index 06e001c..9097cce 100644
--- a/src/hb-coretext.cc
+++ b/src/hb-coretext.cc
@@ -698,8 +698,15 @@ retry:
CFAttributedStringSetAttribute (attr_string, CFRangeMake (0, chars_len),
kCTVerticalFormsAttributeName, kCFBooleanTrue);
}
+
if (buffer->props.language)
{
+/* What's the iOS equivalent of this check?
+ * The symbols was introduced in iOS 7.0.
+ * At any rate, our fallback is safe and works fine. */
+#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090
+# define kCTLanguageAttributeName CFSTR ("NSLanguage")
+#endif
CFStringRef lang = CFStringCreateWithCStringNoCopy (kCFAllocatorDefault,
hb_language_to_string (buffer->props.language),
kCFStringEncodingUTF8,
More information about the HarfBuzz
mailing list