Closed rcancro closed 1 year ago
Patch coverage: 100.00
% and no project coverage change.
Comparison is base (
d803751
) 85.36% compared to head (ecd3be1
) 85.36%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
I was using the commandline tool to convert svg icons to SF Symbols. There were a few examples where the height of the icon is less than its width, causing the computation of the scale in
Renderer.SFSymbol.swift
makeTransformation
to be too large. This resulted in the width of the symbol being incorrect.I have included one of the icon svg tiles (dash.svg) and a test to make sure the bounds are computed properly. I’m not sure if this is the proper fix, but a repro step is very easy. Simply run:
Here is the input file:![dash](https://github.com/swhitty/SwiftDraw/assets/285809/4bf16e89-840f-4048-b180-82d7295ba7c1)
Here is the SF Symbol file before this patch:![dash-symbol-broken](https://github.com/swhitty/SwiftDraw/assets/285809/a8e5a6c8-f10b-468b-a709-865d90fd4c21)
And here is the SF Symbol file afterwards:![dash-symbol](https://github.com/swhitty/SwiftDraw/assets/285809/d4be4fd8-2389-4668-8a9c-1ef736a47e9e)