Skip to content

[web] Icon font from package doesn't load correctly #39486

@sgon00

Description

@sgon00
[✓] Flutter (Channel master, v1.9.7-pre.21, on Mac OS X 10.14.5 18F132, locale en-CN)
    • Flutter version 1.9.7-pre.21 at /Users/user/opt/flutter
    • Framework revision 9f4ab273f1 (10 hours ago), 2019-08-28 20:02:08 -0700
    • Engine revision f52c0b9270
    • Dart version 2.5.0

I am using the unforked flutter web version. (I use flutter create --web <project_name> to create the project).

I am wondering how I can use an icon plugin for instance https://pub.dev/packages/material_design_icons_flutter

Edited:

I tried many ways to make it work, but none of them works. For example, the normal flutter workflow:

pubspec.yaml:

dependencies:
  material_design_icons_flutter: 3.2.4096

main.dart:

import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';

....
            Icon(MdiIcons.account,),
...

and then execute $ flutter run -d chrome

The font file materialdesignicons-webfont.ttf is loaded in chrome browser, but it's not rendered:

Screen Shot 2019-08-30 at 01 07 49

So can anyone please teach me how I can use material_design_icons_flutter package in unforked flutter web? Thanks a lot.

Metadata

Metadata

Labels

a: typographyText rendering, possibly libtxtc: renderingUI glitches reported at the engine/skia or impeller rendering levelplatform-webWeb applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions