Closed mikelikespie closed 1 week ago
@mikelikespie have you tried looking into the failing test testFontWithProperties()
?
@mikelikespie I cherry-picked your change and fixed the failing test #330. Thanks for the contribution!
Thanks so much! APologies for not fixin the test, it got lost in my todos
On Sun, Jun 16, 2024 at 1:38 AM Guille Gonzalez @.***> wrote:
@mikelikespie https://github.com/mikelikespie I cherry-picked your change and fixed the failing test #330 https://github.com/gonzalezreal/swift-markdown-ui/pull/330. Thanks for the contribution!
— Reply to this email directly, view it on GitHub https://github.com/gonzalezreal/swift-markdown-ui/pull/314#issuecomment-2171253031, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAFHOY6UDU6D23KI3RJE7LZHVFHBAVCNFSM6AAAAABHMCODT2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZRGI2TGMBTGE . You are receiving this because you were mentioned.Message ID: @.***>
Right now it seems the library accounts for dynamic type twice when using custom fonts.
This is because it is using the
@ScaledMetric
for dynamic size, as well ascustom(_ name: String, size: CGFloat)
constructor for Font. The docs for that one sayWhich means its scales it again.
It seems like the easiest fix is just calling the other constructor for custom fonts which has a
fixedSize
parameter. It appears that all the versions required in Package.swift support that constructor.