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

The font "Noto Color Emoji" fails to render on windows app #575

Open
1 task done
hioshih opened this issue Mar 31, 2024 · 2 comments
Open
1 task done

The font "Noto Color Emoji" fails to render on windows app #575

hioshih opened this issue Mar 31, 2024 · 2 comments
Labels
bug Something isn't working p: google_fonts

Comments

@hioshih
Copy link

hioshih commented Mar 31, 2024

Package

google_fonts

Existing issue?

What happened?

Expected vs actual result:

When I use the font "Noto Color Emoji", it doesn't render any emojis.
Other fonts like Roboto, Kanit and others works fine.
Just on the flutter package "google_fonts", it leaves a blank space instead of emojis.
On google chrome, it renders normally too.

Steps to reproduce:

  1. Install the latest google_fonts package with "flutter pub add google_fonts" (^6.2.1 atm)
  2. Start a new flutter project, and add some Text as in the example bellow.
  3. Compile it to windows (Windows 10 - x64)
  4. All emojis using the "Noto Color Emoji" are not rendered while the rest is fine, including other google fonts.

Example:

            Text('Google Fonts 😊 Kanit',
                style: GoogleFonts.kanit(
                  textStyle: const TextStyle(fontSize: 20),
                )),
            Text('Google Fonts 😊🇫🇷 notoEmoji',
                style: GoogleFonts.notoEmoji(
                  textStyle: const TextStyle(fontSize: 20),
                )),
            Text('Google Fonts 😊🇫🇷 notoColorEmoji',
                style: GoogleFonts.notoColorEmoji(
                  textStyle: const TextStyle(fontSize: 20),
                )),

Output:
image

Relevant log output

No response

@hioshih hioshih added bug Something isn't working triage Issues that haven't been triaged labels Mar 31, 2024
@guidezpl guidezpl added p: google_fonts and removed triage Issues that haven't been triaged labels Jul 2, 2024
@Merrit
Copy link

Merrit commented Aug 14, 2024

Can confirm.

Flutter 3.24.0
Windows 10

Minimal reproducable example:

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

void main() => runApp(const MainApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              const Text(
                'Hello World',
                style: TextStyle(fontSize: 30),
              ),
              const SizedBox(height: 20),
              Text(
                '😊',
                style: TextStyle(
                  fontSize: 50,
                  fontFamily: GoogleFonts.notoColorEmoji().fontFamily,
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Easily demonstrated by toggling commented for the fontFamily line and hot reloading.

When using Noto Color Emoji, it is invisible:

image

With the fontFamily commented out so as not to use Noto it appears with the Windows emoji font:

image

@aisnote
Copy link

aisnote commented Sep 16, 2024

meet the same issue with c++, anyone has the answer? thanks.

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

4 participants