ScerIO / icon_font_generator

☣️ Flutter Icon Font Generator
https://pub.dev/packages/icon_font_generator
Other
96 stars 50 forks source link

Noto fonts missing character #13

Open KaushickSArgekar opened 3 years ago

KaushickSArgekar commented 3 years ago

Could not find a set of Noto fonts to display all missing characters. Please add a font asset for the missing characters. See: https://flutter.dev/docs/cookbook/design/fonts

SergeShkurko commented 3 years ago

@KaushickSArgekar you added font at pubspec? (from readme instruction) image

also need run flutter clean and restart app

KaushickSArgekar commented 3 years ago

Yes, @SergeShkurko I have added the font family in pubspec.yamil.

flutter: fonts:

KaushickSArgekar commented 3 years ago

I am using the icons in the package and then exporting them in a project.

SergeShkurko commented 3 years ago

@KaushickSArgekar

Could not find a set of Noto

here the font is named differently

infinito84 commented 3 years ago

Works from restart the flutter run process

andreyp3054 commented 1 week ago

I solved the bug by setting the correct font family in the pubspec.yaml file. Steps:

  1. Go to the generated icon font file, in my case the name is my_icons.dart image
  2. Copy the iconFontFamily value
  3. Paste the value to the font family config image

Better/Organized way: If you are using icon_font.yaml to generate the custom fonts, follow these steps:

  1. Create icon_font.yaml file

    icon_font:
    input_svg_dir: "assets/svg/"
    output_font_file: "fonts/my_icons_font.otf"
    
    output_class_file: "lib/my_icons.dart"
    class_name: "MyIcons"
    package: my_font_package     // remove this if you don't know how to set the package in pubspec.yaml
    format: true
    
    font_name: "My Icons"
    normalize: true
    ignore_shapes: true
    
    recursive: true
    verbose: false

    Note: I removed the package config in my case

  2. Run this command in CLI: dart run icon_font_generator:generator --config-file=icon_font.yaml -r Copy the iconFontFamily value from the generated dart file.

  3. Add dependencies to pubspec.yaml and use the iconFontFamily value correctly ( 'My Icons' in this case) example:

    fonts:
    - family: My Icons
      fonts:
        - asset: fonts/my_icons_font.otf

If this does not work, please comment again. Thanks!