Skip to content

Commit c09a14f

Browse files
authored
Removes lineHeightMultiplier from DefaultStringAttributes (#361)
* Removes lineHeightMultiplier from DefaultStringAttributes * Removes initializer
1 parent e21d5ac commit c09a14f

1 file changed

Lines changed: 4 additions & 20 deletions

File tree

Sources/Runestone/Library/DefaultStringAttributes.swift

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,15 @@ import Foundation
22
import UIKit
33

44
struct DefaultStringAttributes {
5-
private let textColor: UIColor
6-
private let font: UIFont
7-
private let kern: CGFloat
8-
private let tabWidth: CGFloat
9-
private let lineHeightMultiplier: CGFloat
10-
11-
init(
12-
textColor: UIColor,
13-
font: UIFont,
14-
kern: CGFloat,
15-
tabWidth: CGFloat,
16-
lineHeightMultiplier: CGFloat = 1
17-
) {
18-
self.textColor = textColor
19-
self.font = font
20-
self.kern = kern
21-
self.tabWidth = tabWidth
22-
self.lineHeightMultiplier = lineHeightMultiplier
23-
}
5+
let textColor: UIColor
6+
let font: UIFont
7+
let kern: CGFloat
8+
let tabWidth: CGFloat
249

2510
func apply(to attributedString: NSMutableAttributedString) {
2611
let paragraphStyle = NSMutableParagraphStyle()
2712
paragraphStyle.tabStops = []
2813
paragraphStyle.defaultTabInterval = tabWidth
29-
paragraphStyle.lineHeightMultiple = lineHeightMultiplier
3014
let range = NSRange(location: 0, length: attributedString.length)
3115
let attributes: [NSAttributedString.Key: Any] = [
3216
.foregroundColor: textColor,

0 commit comments

Comments
 (0)