Skip to content

Commit 855319c

Browse files
Apple renamed CTFontOrientation values. (#630)
* `kCTFontDefaultOrientation` -> `kCTFontOrientationDefault` * `kCTFontOrientationHorizontal` -> `kCTFontOrientationHorizontal` * `kCTFontOrientationVertical` -> `kCTFontOrientationVertical` The old names were deprecated in macOS 10.11, iOS 9. The new names were introduced in macOS 10.8, iOS 6. Fixes #438.
1 parent 18df9aa commit 855319c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

core-text/src/font_descriptor.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,12 @@ impl TraitAccessors for CTFontTraits {
182182
* CTFontDescriptor.h
183183
*/
184184
pub type CTFontOrientation = u32;
185-
pub const kCTFontDefaultOrientation: CTFontOrientation = 0;
186-
pub const kCTFontHorizontalOrientation: CTFontOrientation = 1;
187-
pub const kCTFontVerticalOrientation: CTFontOrientation = 2;
185+
pub const kCTFontDefaultOrientation: CTFontOrientation = 0; // deprecated since macOS 10.11, iOS 9
186+
pub const kCTFontOrientationDefault: CTFontOrientation = 0; // introduced in macOS 10.8, iOS 6
187+
pub const kCTFontHorizontalOrientation: CTFontOrientation = 1; // deprecated since macOS 10.11, iOS 9
188+
pub const kCTFontOrientationHorizontal: CTFontOrientation = 1; // introduced in macOS 10.8, iOS 6
189+
pub const kCTFontVerticalOrientation: CTFontOrientation = 2; // deprecated since macOS 10.11, iOS 9
190+
pub const kCTFontOrientationVertical: CTFontOrientation = 2; // introduced in macOS 10.8, iOS 6
188191

189192
pub type CTFontPriority = u32;
190193
pub const kCTFontPrioritySystem: CTFontPriority = 10000;

0 commit comments

Comments
 (0)