From aa748f2cddfbdfcc0e9dbb1df04040fc0c75021d Mon Sep 17 00:00:00 2001 From: bensLine Date: Mon, 22 Mar 2021 15:22:11 +0100 Subject: [PATCH] Prefer configured font size over bold/italic descriptor size --- Sources/SwiftyMarkdown/SwiftyMarkdown+iOS.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/SwiftyMarkdown/SwiftyMarkdown+iOS.swift b/Sources/SwiftyMarkdown/SwiftyMarkdown+iOS.swift index 4141aa6..84a029f 100644 --- a/Sources/SwiftyMarkdown/SwiftyMarkdown+iOS.swift +++ b/Sources/SwiftyMarkdown/SwiftyMarkdown+iOS.swift @@ -130,10 +130,10 @@ extension SwiftyMarkdown { } if globalItalic, let italicDescriptor = font.fontDescriptor.withSymbolicTraits(.traitItalic) { - font = UIFont(descriptor: italicDescriptor, size: 0) + font = UIFont(descriptor: italicDescriptor, size: fontSize ?? 0) } if globalBold, let boldDescriptor = font.fontDescriptor.withSymbolicTraits(.traitBold) { - font = UIFont(descriptor: boldDescriptor, size: 0) + font = UIFont(descriptor: boldDescriptor, size: fontSize ?? 0) } return font