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

When using GoogFonts.poppins the non-breaking hypen: ‑ (U+2011) is displayed as a small underscore instead of a hyphen on Android devices #570

Open
1 task done
MichaelTamm opened this issue Mar 22, 2024 · 1 comment
Labels
bug Something isn't working p: google_fonts

Comments

@MichaelTamm
Copy link

Package

google_fonts

Existing issue?

What happened?

Expected vs actual result:

Expected: The non-breaking hypen should be displayed as a hyphen
Actual: The non-brekaing hyphen is displayed as a small underscore (See attached screenshot).

Steps to reproduce:

Here is a minimal Flutter app to reproduce this problem:

Note: I could not reproduce it with https://dartpad.dev !? But the error should be reproducible on an Android device.

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Non-Breaking Hyphen Demo',
      debugShowCheckedModeBanner: false,
      home: MyDemoPage(),
    );
  }
}

class MyDemoPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Non-Breaking Hyphen Demo'),
      ),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Text('Default-Font:', style: TextStyle(fontWeight: FontWeight.bold)),
            SizedBox(height: 5),
            Text('With normal hyphen: E-Mail'),
            SizedBox(height: 5),
            Text('With non-breaking hyphen: E\u{2011}Mail'),
            SizedBox(height: 25),
            Text('Poppins:', style: TextStyle(fontWeight: FontWeight.bold)),
            SizedBox(height: 5),
            Text('With normal hyphen: E-Mail', style: GoogleFonts.poppins()),
            SizedBox(height: 5),
            Text('With non-breaking hyphen: E\u{2011}Mail', style: GoogleFonts.poppins()),
          ],
        ),
      ),
    );
  }
}

image

Relevant log output

No response

@MichaelTamm MichaelTamm added bug Something isn't working triage Issues that haven't been triaged labels Mar 22, 2024
@MichaelTamm MichaelTamm changed the title When using GoogFont.poppins the non-breaking hypen: ‑ (U+2011) is displayed as a small underscore instead of a hyphen on Android devices When using GoogFonts.poppins the non-breaking hypen: ‑ (U+2011) is displayed as a small underscore instead of a hyphen on Android devices Mar 22, 2024
@guidezpl guidezpl added p: google_fonts and removed triage Issues that haven't been triaged labels Jul 2, 2024
@jeroen-meijer
Copy link

jeroen-meijer commented Sep 12, 2024

We're experiencing the same issue with DM Sans.

See the images below (using the French string "entre‑temps." containing the hyphen in question).

Note

We've only observed this issue on Android. It does not happen on iOS.

Roboto DM Sans
image image

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