hugeicons_plus

pub package CI License: MIT

5,400+ Hugeicons as a variable-stroke OpenType font for Flutter. Use Icon / IconData like Material icons; change stroke width with Icon.weight.

Built with fontify_plus. Outline-style SVGs are converted to fill glyphs (fonts cannot draw strokes), then emitted as a CFF2 font whose wght axis is the SVG stroke width in design units.

Icon(HugeIcons.home01)                          // stroke 1.5
Icon(HugeIcons.home01, size: 24, weight: 0.5)   // thin
Icon(HugeIcons.search01, color: Colors.teal, weight: 2)

Install

dependencies:
  hugeicons_plus: ^0.1.0

The font is bundled. Do not add a fonts: entry in the app pubspec.

Usage

import 'package:hugeicons_plus/hugeicons_plus.dart';

Icon(HugeIcons.home01)
IconButton(icon: Icon(HugeIcons.settings01), onPressed: () {})

Works anywhere Flutter takes IconData: AppBar.actions, NavigationBar, InputDecoration.prefixIcon, FloatingActionButton, …

Stroke width

The axis is literal SVG stroke width, not CSS 100–900.

Range 0.53.0
Default (Icon with no weight) 1.5 (Hugeicons’ designed width)

Icon.weight needs Flutter 3.16+. On 3.10–3.15:

Text(
  String.fromCharCode(HugeIcons.home01.codePoint),
  style: TextStyle(
    fontFamily: HugeIcons.fontFamily,
    package: HugeIcons.fontPackage,
    fontSize: 24,
    fontVariations: [FontVariation('wght', 1.5)],
  ),
)

See example/ (flutter run -d chrome) for a searchable gallery with size and weight sliders.

Why fontify_plus (vs other Hugeicons packages)

Official Hugeicons for Flutter moved off icon fonts to flutter_svg because a static TTF freezes one stroke width. fontify_plus puts the set back in a font, with a variable axis, so you keep IconData and still vary width.

hugeicons_plus hugeicons hugeicons_pro
API Icon(HugeIcons.home01) custom HugeIcon widget Icon(HugeIconsStroke.home01)
Stroke width weight: on Icon (interpolated) strokeWidth rewrites SVG baked into the TTF
Extra runtime deps none flutter_svg none
Theme / IconTheme native via the wrapper native
IconButton / nav bars drop-in IconData wrapper or manual IconData drop-in
Stroked SVGs outlined, then filled SVG renderer pre-baked fills
Styles Stroke Rounded Stroke Rounded Stroke + Solid (two fonts)
Tree-shaking yes (release font subset) yes yes (release font subset)

What fontify_plus is doing that those other pipelines do not:

  • Stroke outlining. Glyphs are filled regions. Hugeicons are centreline strokes. Without outlining, a font glyph has no area and renders blank.
  • wght = SVG units. weight: 1.33 is the width the icon was drawn at, not a weight class. Two masters; every width in between is interpolation.
  • Default 1.5, not the axis maximum. Icon(HugeIcons.home01) matches the designed set. Ends of the range stay available for thin/bold.
  • package: on every IconData. The font resolves from this dependency without copying it into the app.
  • Generator kept out of the published package. fontify_plus needs Dart 3.11; this package stays on Dart 3.0.

Trade-offs

  • The OTF is ~8 MB in debug. Release builds subset it to the IconData you actually use (--tree-shake-icons, on by default).
  • Free Hugeicons only: Stroke Rounded. Solid / Bulk / Duotone are Pro drawings, not thicker strokes — they are not on this axis.
  • A few icons mix two authored widths; the axis uses one width for the whole glyph.
  • Icons keep their 24×24 artboard: Icon(..., size: 24) matches the SVG at 24px, including the padding Hugeicons drew inside the viewBox.

Icons

Names come from the SVG file (home-01.svgHugeIcons.home01). Leading digits are dropped so the identifier is legal Dart (1stBracketstBracket).

Source: @hugeicons/core-free-icons (MIT).

License

MIT. Icons © Hugeicons, used under their free MIT license.

Libraries

hugeicons_plus