Closed ZsoltFischer closed 1 year ago
Hi, thanks for this very detailed problem description.
Please go to your font_awesome_flutter directory, run flutter clean
and then flutter pub get
- this will likely fix your problem.
You may have to run flutter clean
in your project where font_awesome_flutter is a dependency as well - then rebuild it.
Hi, This is exactly what I started with (both project and font_awesome_flutter directories + deleting app from emulator) without any results unfortunately. I also tried deleting .lock and other generated files too.
Ok, another guess would be that the icon file names do not match those in the pubspec.yaml (of font_awesome_flutter).
The generator said it enabled all styles successfully, so it's probably either this or some sort of caching..
Checked the file names, they are correct. I ran clean(s) & cache repair multiple times unfortunately without success. The only unusual warning is this, when I run pub get
in font_awesome_flutter:
#
This app is using a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to migrate this app to the V2 embedding.
Take a look at the docs for migrating an app: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
#
However after some searching it seems like this shouldn't cause the problem
I also tried deleting the whole font_awesome_flutter directory and cloned the current source code.
Are the icons also missing in the example app?
(To run via command line:
Change directory to font_awesome_flutter/example
Run flutter run
)
This way we'd be able to narrow down the problem.
On Android it fails with:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Warning ───────────────────────────────────────────────────────── Your Flutter application is created using an older version of the Android embedding. It is being deprecated in favor of Android embedding v2. Follow the steps at
https://flutter.dev/go/android-project-migration
to migrate your project. You may also pass the --ignore-deprecation flag to ignore this check and continue with the deprecated v1 embedding. However, the v1 Android embedding will be removed in future versions of Flutter. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ The detected reason was:
/Users/.../font_awesome_flutter/example/android/app/src/main/AndroidManifest.xml uses android:name="io.flutter.app.FlutterApplication"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Build failed due to use of deprecated Android v1 embedding.
[update]: On iOS Simulator the example app starts, but with render errors. It seems like the problem only affects the Regular and Solid icons.
I have the same Problem and can confirm that cleaning dependencies and doesn't work for me either.
It's the same problem that @ZsoltFischer has. The regular and solid icons do not work, the others do.
Thanks for your feedback @ZsoltFischer and @hauketoenjes. I'll take a look as soon as possible. I cannot give you an estimate as to when I will be able to, as I am currently very short on time.
Ok, this is interesting. It seems that the problem was on Font Awesome's side. I just re-downloaded the icon fonts and now they are working as expected (see the screenshots)
When looking at the git diff, they changed something in the .ttf
files and also the icons.json
file got changed with a new lastModified
date for all icons (from 7 days ago, instead of a few months ago). Maybe this got fixed in the 6.1.2 Release of Font Awesome.
So, the fix for this issue would be to just re-download the Font-Awesome Fonts and re-run the configurator script.
@michaelspiss I think this issue can then be closed. Maybe @ZsoltFischer can try it out to confirm that this was indeed the issue and got solved by Font Awesome.
Before re-downloading:
After re-downloading:
Thanks @hauketoenjes for this more than welcome update! I'd love to hear if this works for @ZsoltFischer as well, just to make sure.
Hi! Thank you for the suggestion, this solved the problems for me too. I think this issue can be closed now.
Description
Font Awesome 6.1.1 Pro icons are rendered with a crossed-out placeholder whereas free icons are displayed correctly.
In the widget inspector I can see the all icons (e.g.: FontAwesomeIcons.brainArrowCurvedRight-> IconData(U+0F677)) but the display is still not right.
To Reproduce
FontAwesomeFlutter version: 10.1.0 FontAwesome version: 6.1.1
I do have the pro icons. I've placed all
.ttf
files and theicons.json
under font_awesome_flutter/lib/fonts, and ran the configurator.The output of configurator.sh: #
Using font_awesome_flutter version 10.1.0 Downloading https://api.github.com/repos/fluttercommunity/font_awesome_flutter/releases
Custom icons.json found, generating files Duotone icons are no longer supported. Automatically disabled them.
Generating icon definitions Formatted lib/font_awesome_flutter.dart Formatted 1 file (1 changed) in 0.59 seconds.
Generating example code Formatted example/lib/icons.dart Formatted 1 file (1 changed) in 0.37 seconds.
Found and enabled the following icon styles: brands, regular, solid, light, thin
Running "dart pub get" Resolving dependencies... Because font_awesome_flutter depends on flutter_test from sdk which doesn't exist (the Flutter SDK is not available), version solving failed.
Flutter users should run
flutter pub get
instead ofdart pub get
.Done
I've tried the following steps:
Expected behavior I'd like the pro icons to display like the free ones.
Screenshots
The icon on top is a pro icon, the bottom one is free.
Desktop:
Smartphone: