diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/macfont.m | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/macfont.m b/src/macfont.m index b25640e0cb8..02dc46824e9 100644 --- a/src/macfont.m +++ b/src/macfont.m | |||
| @@ -3521,15 +3521,25 @@ mac_ctfont_create_preferred_family_for_attributes (CFDictionaryRef attributes) | |||
| 3521 | static inline double | 3521 | static inline double |
| 3522 | mac_ctfont_get_advance_width_for_glyph (CTFontRef font, CGGlyph glyph) | 3522 | mac_ctfont_get_advance_width_for_glyph (CTFontRef font, CGGlyph glyph) |
| 3523 | { | 3523 | { |
| 3524 | return CTFontGetAdvancesForGlyphs (font, kCTFontDefaultOrientation, | 3524 | return CTFontGetAdvancesForGlyphs (font, |
| 3525 | &glyph, NULL, 1); | 3525 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 |
| 3526 | kCTFontOrientationDefault, | ||
| 3527 | #else | ||
| 3528 | kCTFontDefaultOrientation, | ||
| 3529 | #endif | ||
| 3530 | &glyph, NULL, 1); | ||
| 3526 | } | 3531 | } |
| 3527 | 3532 | ||
| 3528 | static inline CGRect | 3533 | static inline CGRect |
| 3529 | mac_ctfont_get_bounding_rect_for_glyph (CTFontRef font, CGGlyph glyph) | 3534 | mac_ctfont_get_bounding_rect_for_glyph (CTFontRef font, CGGlyph glyph) |
| 3530 | { | 3535 | { |
| 3531 | return CTFontGetBoundingRectsForGlyphs (font, kCTFontDefaultOrientation, | 3536 | return CTFontGetBoundingRectsForGlyphs (font, |
| 3532 | &glyph, NULL, 1); | 3537 | #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 |
| 3538 | kCTFontOrientationDefault, | ||
| 3539 | #else | ||
| 3540 | kCTFontDefaultOrientation, | ||
| 3541 | #endif | ||
| 3542 | &glyph, NULL, 1); | ||
| 3533 | } | 3543 | } |
| 3534 | 3544 | ||
| 3535 | static CFArrayRef | 3545 | static CFArrayRef |
| @@ -3891,7 +3901,7 @@ mac_font_copy_default_descriptors_for_language (CFStringRef language) | |||
| 3891 | #endif | 3901 | #endif |
| 3892 | { | 3902 | { |
| 3893 | CTFontRef user_font = | 3903 | CTFontRef user_font = |
| 3894 | CTFontCreateUIFontForLanguage (kCTFontUserFontType, 0, language); | 3904 | CTFontCreateUIFontForLanguage (kCTFontUIFontUser, 0, language); |
| 3895 | 3905 | ||
| 3896 | if (user_font) | 3906 | if (user_font) |
| 3897 | { | 3907 | { |