microsoft / microsoft/fluentui-apple
Font Size doesn't adapt to Dynamic Typing
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 977
- Forks
- 180
- Avg merge
- 21h 38m
- Merged PRs (30d)
- 1
Description
Environment Information
- Platform:
- iOS
- macOS
- Package version(s): (fill this out, include which package manager you're using) 0.19.0
- Xcode and OS versions: (fill this out if relevant) xcode 14.3, ios 15+
Please provide a reproduction of the bug:
import FluentUI
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundColor(.accentColor)
Text("Hello, world!").font(Font(FluentTheme.shared.typography(.body1Strong)))
}
.padding()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Above code used FluentTheme to read font info. when i run this code and chose dynamic typing from xcode debug option or set the font size from Accessibility >> Large Text Option, Then font in sample app is not adapting to the changed size.
Actual behavior:
Font size not adapting to changed value
Expected behavior:
Font size should change according to settings
Priorities and help requested:
Are you willing to submit a PR to fix? (Yes, No) No
Requested priority: (Blocking, High, Normal, Low) High
Products/applications affected: (if applicable)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SwiftUI ContentView reproduction and the FluentTheme.shared.typography(.body1Strong) call, then run it on iOS 15+ while changing Dynamic Type or the Accessibility large-text setting. Done means the rendered font size changes with the system setting, matching the expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- accessibility, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100