Open KaushickSArgekar opened 3 years ago
@KaushickSArgekar you added font at pubspec? (from readme instruction)
also need run flutter clean and restart app
Yes, @SergeShkurko I have added the font family in pubspec.yamil.
flutter: fonts:
I am using the icons in the package and then exporting them in a project.
@KaushickSArgekar
Could not find a set of Noto
here the font is named differently
Works from restart the flutter run process
I solved the bug by setting the correct font family in the pubspec.yaml
file.
Steps:
my_icons.dart
Better/Organized way: If you are using icon_font.yaml
to generate the custom fonts, follow these steps:
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
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.
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!
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