[coretext] Pass buffer language to CoreText
This commit is contained in:
parent
3eb6a4dbf2
commit
1b3011c27d
|
@ -698,6 +698,18 @@ retry:
|
||||||
CFAttributedStringSetAttribute (attr_string, CFRangeMake (0, chars_len),
|
CFAttributedStringSetAttribute (attr_string, CFRangeMake (0, chars_len),
|
||||||
kCTVerticalFormsAttributeName, kCFBooleanTrue);
|
kCTVerticalFormsAttributeName, kCFBooleanTrue);
|
||||||
}
|
}
|
||||||
|
if (buffer->props.language)
|
||||||
|
{
|
||||||
|
CFStringRef lang = CFStringCreateWithCStringNoCopy (kCFAllocatorDefault,
|
||||||
|
hb_language_to_string (buffer->props.language),
|
||||||
|
kCFStringEncodingUTF8,
|
||||||
|
kCFAllocatorNull);
|
||||||
|
if (unlikely (!lang))
|
||||||
|
FAIL ("CFStringCreateWithCStringNoCopy failed");
|
||||||
|
CFAttributedStringSetAttribute (attr_string, CFRangeMake (0, chars_len),
|
||||||
|
kCTLanguageAttributeName, lang);
|
||||||
|
CFRelease (lang);
|
||||||
|
}
|
||||||
CFAttributedStringSetAttribute (attr_string, CFRangeMake (0, chars_len),
|
CFAttributedStringSetAttribute (attr_string, CFRangeMake (0, chars_len),
|
||||||
kCTFontAttributeName, font_data->ct_font);
|
kCTFontAttributeName, font_data->ct_font);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue