Skip to content

[QUESTION] MacOS<->iOS bold font different behaviour #1500

@pezi

Description

@pezi

The app uses the Inter font throughout.

textTheme: TextTheme(
    displayLarge: const TextStyle(
      fontFamily: 'inter',
      fontSize: 72,
      fontWeight: FontWeight.bold,
    ),
    titleLarge: const TextStyle(
      fontFamily: 'inter',
      fontSize: 20,
      fontStyle: FontStyle.normal,
    ),
    bodyMedium: const TextStyle(fontFamily: 'inter'),
    displaySmall: const TextStyle(fontFamily: 'inter'),

pubspec.yaml

      fonts:
        - asset: assets/fonts/Inter-VariableFont_opsz_wght.ttf

The flutter_html package is used for the user guide. It works correctly on iOS and Android, but on macOS the <strong> tag does not render as bold when using the variable font.
Using the split/static variants of the Inter font fixes the issue, but it would be preferable to use the same configuration across all platforms.

        - asset: assets/fonts/Inter-Light.ttf
          weight: 300
        - asset: assets/fonts/Inter-Regular.ttf
          weight: 400
        - asset: assets/fonts/Inter-Medium.ttf
          weight: 500
        - asset: assets/fonts/Inter-SemiBold.ttf
          weight: 600
        - asset: assets/fonts/Inter-Bold.ttf
          weight: 700
        - asset: assets/fonts/Inter-ExtraBold.ttf
          weight: 800
        - asset: assets/fonts/Inter-Black.ttf
          weight: 900

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions