Skip to content

Commit

Permalink
Merge pull request SimonFairbairn#110 from bensLine/master
Browse files Browse the repository at this point in the history
Fix bold font size get's overridden by font descriptor
  • Loading branch information
SimonFairbairn authored Apr 9, 2021
2 parents 5b0a1e7 + aa748f2 commit 2bbf121
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/SwiftyMarkdown/SwiftyMarkdown+iOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2bbf121

Please sign in to comment.