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

There is an issue with the Montserrat font if the phone setting “Bold text” is active #536

Open
1 task done
nickolight opened this issue Jan 24, 2024 · 2 comments
Open
1 task done
Labels
bug Something isn't working p: google_fonts

Comments

@nickolight
Copy link

nickolight commented Jan 24, 2024

Package

google_fonts

Existing issue?

What happened?

Expected vs actual result:

The digit "8" is broken at font-weight 200 and 300, starting at a certain font size. Later, I discovered that the capital letter 'Q' was also broken in some font-weights!!!

Screenshot 2024-01-24 at 22 17 54 Screenshot 2024-01-25 at 11 28 42

Steps to reproduce:

  1. Take a device with 2400*1080 resolution and Android 14 OS. (Samsung sm-a528b)
  2. Go to Settings -> Display -> Display size and text -> Turn on the switcher "Bold text"
  3. Run the following code:
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        textTheme: GoogleFonts.montserratTextTheme(),
        useMaterial3: true,
      ),
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Theme.of(context).colorScheme.inversePrimary,
          title: const Text("Montserrat Font Test Page"),
        ),
        body: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: <Widget>[
            const SizedBox(height: 50),
            const Text('w200, fontSize22:'),
            Text(
              'abcdefghijklmnopqQrstuvwxyz 1234567890',
              style: GoogleFonts.montserrat(fontWeight: FontWeight.w200, fontSize: 22),
              textAlign: TextAlign.center,
            ),
            const SizedBox(height: 20),
            const Text('w200, fontSize23 and above:'),
            Text(
              'abcdefghijklmnopqQrstuvwxyz 1234567890',
              style: GoogleFonts.montserrat(fontWeight: FontWeight.w200, fontSize: 23),
              textAlign: TextAlign.center,
            ),
            const SizedBox(height: 50),
            const Text('w300, fontSize15:'),
            Text(
              'abcdefghijklmnopqQrstuvwxyz 1234567890',
              style: GoogleFonts.montserrat(fontWeight: FontWeight.w300, fontSize: 15),
              textAlign: TextAlign.center,
            ),
            const SizedBox(height: 20),
            const Text('w300, fontSize16 and above:'),
            Text(
              'abcdefghijklmnopqQrstuvwxyz 1234567890',
              style: GoogleFonts.montserrat(fontWeight: FontWeight.w300, fontSize: 16),
              textAlign: TextAlign.center,
            ),
            const SizedBox(height: 20),
            const Text('w300, fontSize32 and above:'),
            Text(
              'abcdefghijklmnopqQrstuvwxyz 1234567890',
              style: GoogleFonts.montserrat(fontWeight: FontWeight.w300, fontSize: 32),
              textAlign: TextAlign.center,
            ),
          ],
        ),
      ),
    );
  }
}

Relevant log output

[✓] Flutter (Channel stable, 3.16.8, on macOS 13.5.2 22G91 darwin-arm64, locale en-UA)
    • Flutter version 3.16.8 on channel stable at /Users/nikolai/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 67457e669f (8 days ago), 2024-01-16 16:22:29 -0800
    • Engine revision 6e2ea58a5c
    • Dart version 3.2.5
    • DevTools version 2.28.5

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/nikolai/Library/Android/sdk
    • Platform android-33, build-tools 33.0.2
    • ANDROID_HOME = /Users/nikolai/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    • CocoaPods version 1.14.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] Connected device (2 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554             • android-arm64  • Android 14 (API 34) (emulator)
    • Chrome (web)                • chrome                    • web-javascript • Google Chrome 120.0.6099.234

[✓] Network resources
    • All expected network resources are available.
@nickolight nickolight added bug Something isn't working triage Issues that haven't been triaged labels Jan 24, 2024
@guidezpl guidezpl added p: google_fonts and removed triage Issues that haven't been triaged labels Feb 26, 2024
@cka29
Copy link

cka29 commented Oct 10, 2024

Any news on this? We experience the same issue.

@nickolight
Copy link
Author

Yeah, it will be better to use another font)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p: google_fonts
Projects
None yet
Development

No branches or pull requests

3 participants