From 5628ad448a42f04a6c02a1f232117ebd52873207 Mon Sep 17 00:00:00 2001 From: daniele margutti Date: Wed, 11 Dec 2019 18:44:06 +0100 Subject: [PATCH 1/3] #92 Fixed cachedAttribute's font --- Sources/SwiftRichString/Style/Style.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/SwiftRichString/Style/Style.swift b/Sources/SwiftRichString/Style/Style.swift index 10abd96..b09af4b 100644 --- a/Sources/SwiftRichString/Style/Style.swift +++ b/Sources/SwiftRichString/Style/Style.swift @@ -616,6 +616,9 @@ public class Style: StyleProtocol { // string to generate a single attributes dictionary for `NSAttributedString`. let fontAttributes = self.fontData?.attributes ?? [:] self.cachedAttributes = self.innerAttributes.merging(fontAttributes) { (_, new) in return new } + if let font = self.fontData?.font { + self.cachedAttributes?[.font] = font + } return self.cachedAttributes! } From 356585199064d1a3982379b578662c1ae3fa4f5b Mon Sep 17 00:00:00 2001 From: daniele margutti Date: Wed, 11 Dec 2019 18:44:50 +0100 Subject: [PATCH 2/3] Bump to 3.0.4 --- SwiftRichString.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SwiftRichString.podspec b/SwiftRichString.podspec index 48cb250..eb0b747 100644 --- a/SwiftRichString.podspec +++ b/SwiftRichString.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "SwiftRichString" - s.version = "3.0.3" + s.version = "3.0.4" s.summary = "Elegant Strings & Attributed Strings Toolkit for Swift" s.description = <<-DESC SwiftRichString is the best toolkit to work easily with Strings and Attributed Strings. From 20d0df9cb141bf4586bcde8d6ecc8e618718b98f Mon Sep 17 00:00:00 2001 From: daniele margutti Date: Wed, 11 Dec 2019 18:44:56 +0100 Subject: [PATCH 3/3] Bump to 3.0.4 --- SwiftRichString.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SwiftRichString.xcodeproj/project.pbxproj b/SwiftRichString.xcodeproj/project.pbxproj index e02c05a..097b564 100644 --- a/SwiftRichString.xcodeproj/project.pbxproj +++ b/SwiftRichString.xcodeproj/project.pbxproj @@ -1699,7 +1699,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4; PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-macOS"; PRODUCT_NAME = SwiftRichString; SDKROOT = macosx; @@ -1725,7 +1725,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.10; - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4; PRODUCT_BUNDLE_IDENTIFIER = "com.SwiftRichString.SwiftRichString-macOS"; PRODUCT_NAME = SwiftRichString; SDKROOT = macosx;