diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/LockUps/LockupsPlanSMLXL.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/LockUps/LockupsPlanSMLXL.swift index 7d00f3a9..8312e5da 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/LockUps/LockupsPlanSMLXL.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/LockUps/LockupsPlanSMLXL.swift @@ -73,8 +73,11 @@ import Foundation // When messing with the maximum line height, the baseline needs to be adjusted. let baseLineOffset = planLabel.font.descender + (overshoot / 2.0) + // We want the top to align with the top of the headline capitals, ignoring ascenders. + let headlineMatchingOffset = headline.font.ascender - headline.font.capHeight + let paragraphStyle = NSMutableParagraphStyle() - paragraphStyle.maximumLineHeight = planLabel.font.capHeight + overshoot + paragraphStyle.maximumLineHeight = planLabel.font.capHeight + overshoot + headlineMatchingOffset attributedString.addAttribute(.paragraphStyle, value: paragraphStyle, range: range) attributedString.addAttribute(.baselineOffset, value: baseLineOffset, range: range) planLabel.attributedText = attributedString