From 5b6e4d68986f22219c41f434f2bf51e714e485a5 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Wed, 4 Jan 2023 09:57:58 -0800 Subject: [PATCH] fix(mac): utils for mac catalyst (#10157) --- packages/core/platforms/ios/src/NativeScriptUtils.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/platforms/ios/src/NativeScriptUtils.m b/packages/core/platforms/ios/src/NativeScriptUtils.m index 4a0dbd287..ace5af116 100644 --- a/packages/core/platforms/ios/src/NativeScriptUtils.m +++ b/packages/core/platforms/ios/src/NativeScriptUtils.m @@ -49,8 +49,11 @@ BOOL actualItalic = result.fontDescriptor.symbolicTraits & UIFontDescriptorTraitItalic; if ([[font valueForKey:@"isItalic"] boolValue] && !actualItalic) { + #if TARGET_OS_MACCATALYST + #else // The font we got is not actually italic so emulate that with a matrix result = [UIFont fontWithDescriptor:[descriptor fontDescriptorWithMatrix:CGAffineTransformMake(1, 0, 0.2, 1, 0, 0)] size:size]; + #endif } // Check if the resolved font has the correct font-family