Skip to content

Font Size doesn't adapt to Dynamic Typing #1807

@ravikmrsingh8

Description

@ravikmrsingh8

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions