Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftUI Dynamic Type Size Question #301

Open
3 tasks done
chaseklingelzen opened this issue Feb 16, 2024 · 0 comments
Open
3 tasks done

SwiftUI Dynamic Type Size Question #301

chaseklingelzen opened this issue Feb 16, 2024 · 0 comments

Comments

@chaseklingelzen
Copy link

Thank you for contributing to MarkdownUI!

Before you submit an issue, please complete the report with all the relevant details for your bug and go through every item in the checklist.

Describe the bug

First off, this is a pretty incredible library! Thank you for all the hard work on it. We'd like to use this in our SwiftUI project, but are currently wrestling with issues around dynamic type size.

Video demonstrating the issue:

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-02-16.at.17.20.37.mp4
struct ContentView: View {
    var body: some View {
        Markdown("You may be excluded from filing a Beneficial Owner Report if your company is one of the following. Check out the [FinCEN Beneficial Ownership Guide](https://www.fincen.gov/sites/default/files/shared/BOI_Small_Compliance_Guide.v1.1-FINAL.pdf) if you think you may be exempt.")
            .markdownTextStyle {
                FontSize(12)
            }


    Text("You may be excluded from filing a Beneficial Owner Report if your company is one of the following. Check out the [FinCEN Beneficial Ownership Guide](https://www.fincen.gov/sites/default/files/shared/BOI_Small_Compliance_Guide.v1.1-FINAL.pdf) if you think you may be exempt.")
        .font(.system(size: 12))
    }
}

It seems that Markdown and Text view increase/decrease dramatically different. I would expect that they scale proportionally. I've tried this across several different iOS simulators. Can you help me understand why they don't scale proportionally?

Any help here is greatly appreciated!

Checklist

  • I can reproduce this issue with a vanilla SwiftUI project.
  • I can reproduce this issue using the main branch of this package.
  • This bug hasn't been addressed in an existing GitHub issue.

Steps to reproduce
Explanation of how to reproduce the incorrect behavior. This could include an attached project, a link to code, or a Markdown-formatted text exhibiting the issue.

  1. Download this zip
  2. Launch the app
  3. Increase/Decrease dynamic type size w/ cmd + option + "+" / cmd + option + "-"

Markdown-Testing.zip

Expected behavior

Markdown and Text view would scale proportionally when increasing/decreasing dynamic type size.

Screenshots

Same video as above:

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-02-16.at.17.20.37.mp4

Version information

  • MarkdownUI: 2.3.0
  • OS: iPhone 15 Pro (17.2), iPhone 13 min (17.0), several others
  • Xcode: 15.2

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant