diff --git a/Sources/MarkdownUI/Theme/TextStyle/Styles/Font+FontProperties.swift b/Sources/MarkdownUI/Theme/TextStyle/Styles/Font+FontProperties.swift index 85301413..e2b97511 100644 --- a/Sources/MarkdownUI/Theme/TextStyle/Styles/Font+FontProperties.swift +++ b/Sources/MarkdownUI/Theme/TextStyle/Styles/Font+FontProperties.swift @@ -9,7 +9,7 @@ extension Font { case .system(let design): font = .system(size: size, design: design) case .custom(let name): - font = .custom(name, size: size) + font = .custom(name, fixedSize: size) } switch fontProperties.familyVariant { diff --git a/Tests/MarkdownUITests/FontPropertiesTests.swift b/Tests/MarkdownUITests/FontPropertiesTests.swift index 58ce8b8f..45ca6411 100644 --- a/Tests/MarkdownUITests/FontPropertiesTests.swift +++ b/Tests/MarkdownUITests/FontPropertiesTests.swift @@ -20,7 +20,7 @@ // then XCTAssertEqual( - Font.custom("Menlo", size: FontProperties.defaultSize), + Font.custom("Menlo", fixedSize: FontProperties.defaultSize), Font.withProperties(fontProperties) )