Commit a1f78382 authored by YAMAMOTO Mitsuharu's avatar YAMAMOTO Mitsuharu
Browse files

Avoid deprecated enums in mac-ct font backend driver

* src/macfont.m (mac_font_copy_default_descriptors_for_language)
(mac_ctfont_get_advance_width_for_glyph)
(mac_ctfont_get_bounding_rect_for_glyph): Avoid deprecated enums.
parent 455fe1a7
......@@ -3521,15 +3521,25 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no
static inline double
mac_ctfont_get_advance_width_for_glyph (CTFontRef font, CGGlyph glyph)
{
return CTFontGetAdvancesForGlyphs (font, kCTFontDefaultOrientation,
&glyph, NULL, 1);
return CTFontGetAdvancesForGlyphs (font,
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
kCTFontOrientationDefault,
#else
kCTFontDefaultOrientation,
#endif
&glyph, NULL, 1);
}
static inline CGRect
mac_ctfont_get_bounding_rect_for_glyph (CTFontRef font, CGGlyph glyph)
{
return CTFontGetBoundingRectsForGlyphs (font, kCTFontDefaultOrientation,
&glyph, NULL, 1);
return CTFontGetBoundingRectsForGlyphs (font,
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
kCTFontOrientationDefault,
#else
kCTFontDefaultOrientation,
#endif
&glyph, NULL, 1);
}
static CFArrayRef
......@@ -3891,7 +3901,7 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no
#endif
{
CTFontRef user_font =
CTFontCreateUIFontForLanguage (kCTFontUserFontType, 0, language);
CTFontCreateUIFontForLanguage (kCTFontUIFontUser, 0, language);
if (user_font)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment