Correct font used to specify font size. Issue #1878

This commit is contained in:
Maurice Parker 2020-03-12 19:01:10 -05:00
parent 7f20079e4d
commit 77fd3020cc
2 changed files with 4 additions and 3 deletions

View File

@ -248,7 +248,8 @@ private extension ArticleRenderer {
#if os(iOS) #if os(iOS)
func styleSubstitutions() -> [String: String] { func styleSubstitutions() -> [String: String] {
var d = [String: String]() var d = [String: String]()
d["font-size"] = String(describing: UIFontMetrics.default.scaledValue(for: UIFont.systemFontSize)) let bodyFont = UIFont.preferredFont(forTextStyle: .body)
d["font-size"] = String(describing: bodyFont.pointSize)
return d return d
} }
#endif #endif

View File

@ -1,6 +1,6 @@
:root { :root {
font: -apple-system-body; font: -apple-system-body;
font-size: [[font-size]]pt; font-size: [[font-size]]px;
} }
body { body {
@ -77,7 +77,7 @@ body .headerTable {
} }
body .header { body .header {
font: -apple-system-body; font: -apple-system-body;
font-size: [[font-size]]pt; font-size: [[font-size]]px;
color: var(--header-color); color: var(--header-color);
} }
body .header a:link, body .header a:visited { body .header a:link, body .header a:visited {