Comments (10)
Okey, apparently is a Flutter problem => flutter/flutter#34958
from font_awesome_flutter.
Hey there -- unfortunately I don't quite think that'd be possible, since the font itself comes from original FontAwesome team and Flutter is rendering that as-is. Also, since I don't know exactly what you're going for design-wise and if that's specific to your app, it might be tough to make it work for the wider audience.
As an alternative, you could create a custom Widget that accepted an Icon as a parameter and sets the correct font size / padded according to make it work for your design!
from font_awesome_flutter.
@brianegan
I'm not sure about all icons but have found an issue with a coffee icon.
Here is an example of two icons:
Icons.shopping_basket
FontAwesomeIcons.coffee
I have wrapped it to a colored container to show sizes:
I guess it's not a problem with this repo, but since I used it, I reported it here at first.
Should I create an issue at FontAwesome repo, what do you think?
from font_awesome_flutter.
Although not, I found the same issue with other icons:
from font_awesome_flutter.
Same problem for me
I think If you give a size to an icon it shouldn’t exceed the edges of the Icon Widget
from font_awesome_flutter.
I don't think it's impossible to do. The material icons appear to be 75% of the size of the font awesome icons, so in the FaIcon
widget, instead of inheriting the default IconTheme size, you inherit 75% of the default IconTheme size.
from font_awesome_flutter.
This was discussed way before FaIcon
was a thing. You are right, this issue can be fixed with the steps you described above - reopening (providing a fix as soon as my schedule allows)
from font_awesome_flutter.
Awesome. I edited the code and did the same thing and for the most part it works, however the size discrepancy does vary a bit but for the most part I think a value of 75% - 85% does the job.
from font_awesome_flutter.
I have the same problem also on iOS platform
from font_awesome_flutter.
Material icons are all set within squares, font awesome icons within rectangles. This is why they don't work well together and why we need a special FaIcon
class instead of material's Icon
. There is nothing we can do about the geometric differences. It's actually not even a bug, it's intentional.
For the size discrepancy we could add an attribute which multiplies the size with .75 for example. The same result can be obtained by simply wrapping the FaIcon
in a widget which sets the icon's size
parameter to the value needed. In the spirit of keeping the api as clean and as close to the original Icon
as possible, the latter is the recommended way.
Marking this as wontfix.
from font_awesome_flutter.
Related Issues (20)
- Not generating icons.dart file HOT 1
- missing thin icon HOT 1
- Missing icons HOT 5
- Can we reduce file size as flutter did for material icons HOT 1
- Dynamic icon retrieval required regular font to be available HOT 2
- Flutter Font Awesome Kit - Adding Custom Svgs HOT 8
- Allow shadows to be painted underneath an icon
- Unfortunately we need now a new twitter icon HOT 2
- FontAwesomeIcons.clone and FontAwesomeIcons.solidClone are inconsistent with the following link HOT 1
- Web build fails on Flutter 3.13.0 HOT 6
- printVersionNotice sometimes fails HOT 1
- Tree shaking requires @staticIconProvider annotation HOT 1
- FaIcon size 24 HOT 1
- Pro icon get ttf how to obtain icons.json? It seems auto downloaded HOT 1
- Update to 6.5.1 icons HOT 1
- Building FontAwesome pro with GitHub Actions HOT 1
- Running configurator.bat immediately closes console with no result HOT 1
- Icon not rendering in Web Build - Hosted in AWS Amplify HOT 2
- Missing certain icons after upgrade from FA 5 to 6 HOT 2
- Solid Icon showing Regular HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from font_awesome_flutter.