Closed quetool closed 4 years ago
@quetool similarly implemented standard Material & Cupertino icons in flutter. If compared with https://pub.dev/packages/flutter_svg using ttf allows you to display icons with less load on the processor and memory, while the icon remains a vectoron and stretches without loss of quality
@SergeShkurko but let me understand, If I use Icon(UiIcons.myIcon)
to display an icon, am I using the .ttf or just the IconData generated?
@quetool IconData - this is the address of the character in the character table (ttf)
The IconData points to the right glyph in the .ttf, so Flutter is using the .ttf to render that glyph.
The IconData class (UiIcons in your example), just names the glyph characters so you can use them as Icon(UiIcons.myIcon)
. The .ttf font contains the actual glyph paths.
@SergeShkurko @GeertJohan but can I use the .ttf in an RichText? That would solve me many troubles...
@quetool see https://stackoverflow.com/a/56928690/6858892
@SergeShkurko holy mother of ***god! How stupid I am! Thanks!
Hi, that's the question. For what is user the generated .ttf?