Skip to content

Commit

Permalink
Refactor newFontSize init for clarity/conciseness
Browse files Browse the repository at this point in the history
A response to feedback noted here: #57339 (comment)
  • Loading branch information
Siobhan committed Dec 22, 2023
1 parent cbb1078 commit d98f0b7
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -650,10 +650,9 @@ class RCTAztecView: Aztec.TextView {
///
private func applyFontConstraints(to baseFont: UIFont) -> UIFont {
let oldDescriptor = baseFont.fontDescriptor
let newFontSize: CGFloat
let fontMetrics = UIFontMetrics(forTextStyle: .body)

newFontSize = fontMetrics.scaledValue(for: fontSize ?? baseFont.pointSize)
let newFontSize = fontMetrics.scaledValue(for: fontSize ?? baseFont.pointSize)

var newTraits = oldDescriptor.symbolicTraits

Expand Down

0 comments on commit d98f0b7

Please sign in to comment.