diff --git a/Tusker/Views/ContentTextView.swift b/Tusker/Views/ContentTextView.swift index 18425743..5f86f999 100644 --- a/Tusker/Views/ContentTextView.swift +++ b/Tusker/Views/ContentTextView.swift @@ -143,9 +143,9 @@ class ContentTextView: LinkTextView { case "del": attributed.addAttribute(.strikethroughStyle, value: NSUnderlineStyle.single.rawValue, range: attributed.fullRange) case "code": - attributed.addAttribute(.font, value: UIFont.monospacedSystemFont(ofSize: self.font!.pointSize, weight: .regular), range: attributed.fullRange) + attributed.addAttribute(.font, value: UIFont.monospacedSystemFont(ofSize: defaultFont.pointSize, weight: .regular), range: attributed.fullRange) case "pre": - attributed.addAttribute(.font, value: UIFont.monospacedSystemFont(ofSize: self.font!.pointSize, weight: .regular), range: attributed.fullRange) + attributed.addAttribute(.font, value: UIFont.monospacedSystemFont(ofSize: defaultFont.pointSize, weight: .regular), range: attributed.fullRange) attributed.append(NSAttributedString(string: "\n\n")) case "ol", "ul": attributed.trimLeadingCharactersInSet(.whitespacesAndNewlines) @@ -157,7 +157,7 @@ class ContentTextView: LinkTextView { if parentTag == "ol" { let index = (try? node.elementSiblingIndex()) ?? 0 // we use the monospace digit font so that the periods of all the list items line up - bullet = NSAttributedString(string: "\(index + 1).\t", attributes: [.font: UIFont.monospacedDigitSystemFont(ofSize: self.font!.pointSize, weight: .regular)]) + bullet = NSAttributedString(string: "\(index + 1).\t", attributes: [.font: UIFont.monospacedDigitSystemFont(ofSize: defaultFont.pointSize, weight: .regular)]) } else if parentTag == "ul" { bullet = NSAttributedString(string: "\u{2022}\t") } else {