From 9f94d78b158c195cba9fa722311cbcb4710e255a Mon Sep 17 00:00:00 2001 From: Akshat chaturvedi <60667897+akshat3358@users.noreply.github.com> Date: Mon, 18 Sep 2023 17:59:24 +0530 Subject: [PATCH] Remove FXIOS-6346 [v119] DefaultSmallFontBold from LegacyDynamicFontHelper #14266 (#16420) * Issue #14266 Replaced DefaultSmallFontBold with preferredFont And Removed DefaultSmallFontBold from DynamicFontHelper * Refactor [v119] Added Spaces between params #14266 --- Client/Frontend/Browser/Tabs/Legacy/LegacyTabCell.swift | 4 ++-- Client/Helpers/LegacyDynamicFontHelper.swift | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Client/Frontend/Browser/Tabs/Legacy/LegacyTabCell.swift b/Client/Frontend/Browser/Tabs/Legacy/LegacyTabCell.swift index 8bc819ee0ab1..6d57dbdafc44 100644 --- a/Client/Frontend/Browser/Tabs/Legacy/LegacyTabCell.swift +++ b/Client/Frontend/Browser/Tabs/Legacy/LegacyTabCell.swift @@ -56,7 +56,7 @@ class LegacyTabCell: UICollectionViewCell, private lazy var titleText: UILabel = .build { label in label.isUserInteractionEnabled = false label.numberOfLines = 1 - label.font = LegacyDynamicFontHelper.defaultHelper.DefaultSmallFontBold + label.font = DefaultDynamicFontHelper.preferredFont(withTextStyle: .body, size: 12, weight: .semibold) } private lazy var smallFaviconView: FaviconImageView = .build { _ in } @@ -226,7 +226,7 @@ class LegacyTabCell: UICollectionViewCell, screenshotView.image = nil backgroundHolder.transform = .identity backgroundHolder.alpha = 1 - self.titleText.font = LegacyDynamicFontHelper.defaultHelper.DefaultSmallFontBold + self.titleText.font = DefaultDynamicFontHelper.preferredFont(withTextStyle: .body, size: 12, weight: .semibold) layer.shadowOffset = .zero layer.shadowPath = nil layer.shadowOpacity = 0 diff --git a/Client/Helpers/LegacyDynamicFontHelper.swift b/Client/Helpers/LegacyDynamicFontHelper.swift index 7524bd24db7b..652dd4771e3f 100644 --- a/Client/Helpers/LegacyDynamicFontHelper.swift +++ b/Client/Helpers/LegacyDynamicFontHelper.swift @@ -91,9 +91,6 @@ class LegacyDynamicFontHelper: NSObject { var DefaultSmallFont: UIFont { return UIFont.systemFont(ofSize: defaultSmallFontSize, weight: UIFont.Weight.regular) } - var DefaultSmallFontBold: UIFont { - return UIFont.boldSystemFont(ofSize: defaultSmallFontSize) - } /** * Standard