From 090a65e998bb255baaf7fa7b45c73a6a8135f61d Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Sat, 22 Jul 2023 12:14:52 -0500 Subject: [PATCH] added another test property useScaledLineHeight Signed-off-by: Matt Bruce --- VDS.xcodeproj/project.pbxproj | 4 ++-- VDS/Extensions/NSAttributedString.swift | 7 +++++-- VDS/SupportingFiles/ReleaseNotes.txt | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/VDS.xcodeproj/project.pbxproj b/VDS.xcodeproj/project.pbxproj index e320cb6c..aea11af8 100644 --- a/VDS.xcodeproj/project.pbxproj +++ b/VDS.xcodeproj/project.pbxproj @@ -1163,7 +1163,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 32; + CURRENT_PROJECT_VERSION = 33; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1200,7 +1200,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 32; + CURRENT_PROJECT_VERSION = 33; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; diff --git a/VDS/Extensions/NSAttributedString.swift b/VDS/Extensions/NSAttributedString.swift index 49f39f45..ed6f08b8 100644 --- a/VDS/Extensions/NSAttributedString.swift +++ b/VDS/Extensions/NSAttributedString.swift @@ -21,6 +21,7 @@ extension NSAttributedString { extension NSMutableAttributedString { public static var useMinimumLineHeight: Bool = true + public static var useScaledLineHeight: Bool = false public static func mutableText(for text: String, textStyle: TextStyle, useScaledFont: Bool = true, textColor: UIColor, alignment: NSTextAlignment = .left, lineBreakMode: NSLineBreakMode) -> NSMutableAttributedString { //var for if you can scale or not @@ -35,10 +36,12 @@ extension NSMutableAttributedString { var lineHeight = textStyle.lineHeight if scaledMode { - lineHeight = textStyle.scaledLineHeight defaultFont = defaultFont.scaledFont + if useScaledLineHeight { + lineHeight = textStyle.scaledLineHeight + } } - + //set lineHeight if textStyle.lineHeight > 0.0 { if useMinimumLineHeight { diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index f587beb6..ccf05f42 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,3 +1,6 @@ +1.0.33 +======= +- 1.0.32 ======= - Fixed bug dealing with Scaled