Gate the font size style substitution
This commit is contained in:
parent
8e22c711bf
commit
2ed0844efd
@ -266,8 +266,10 @@ private extension ArticleRenderer {
|
|||||||
func styleSubstitutions() -> [String: String] {
|
func styleSubstitutions() -> [String: String] {
|
||||||
var d = [String: String]()
|
var d = [String: String]()
|
||||||
|
|
||||||
|
if #available(macOS 10.16, *) {
|
||||||
let bodyFont = NSFont.preferredFont(forTextStyle: .body)
|
let bodyFont = NSFont.preferredFont(forTextStyle: .body)
|
||||||
d["font-size"] = String(describing: Int(round(bodyFont.pointSize * 1.33)))
|
d["font-size"] = String(describing: Int(round(bodyFont.pointSize * 1.33)))
|
||||||
|
}
|
||||||
|
|
||||||
guard let linkColor = NSColor.controlAccentColor.usingColorSpace(.deviceRGB) else {
|
guard let linkColor = NSColor.controlAccentColor.usingColorSpace(.deviceRGB) else {
|
||||||
return d
|
return d
|
||||||
|
Loading…
x
Reference in New Issue
Block a user