-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New ignoreDynamicFontSize
property for iOS
#132
base: master
Are you sure you want to change the base?
New ignoreDynamicFontSize
property for iOS
#132
Conversation
@SimonFairbairn possible to include this PR in next release please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes only for the indentation.
@@ -128,6 +128,10 @@ extension SwiftyMarkdown { | |||
} else { | |||
font = UIFont.preferredFont(forTextStyle: textStyle) | |||
} | |||
|
|||
if ignoreDynamicFontSize, let fontSize = fontSize { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be a good idea to fix indentation before merging?
@@ -249,6 +249,9 @@ If that is not set, then the system default will be used. | |||
public var bullet : String = "・" | |||
|
|||
public var underlineLinks : Bool = false | |||
|
|||
/// **iOS only** : Setting this boolean to true will force using the exact size set for each style if available. | |||
public var ignoreDynamicFontSize : Bool = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works and covers an genuine use case, but a better solution might be to use scaledFont(for:, maximumPointSize:)
from UIFontMetrics
on SwiftyMarkdown+iOS.swift
instead?
40c26cd
to
f5a9f49
Compare
Hi @leolobato, |
Thanks Seb |
@leolobato possible to merge it plz? |
@Narayane I don't have write permission to this repository. Only @SimonFairbairn should be able to merge and by the number of open, unmerged PRs, I suspect he doesn't have time to maintain this library anymore. I suggest you use your own fork with the fix on your project. |
This PR adds a new
ignoreDynamicFontSize
property that is necessary if you want to set sizes for other styles thenitalic
orbold
without setting the fontName (you cannot get SFUI font via name).Inspired by an old but still opened PR.