All Projects → rbcprolabs → icon_font_generator

rbcprolabs / icon_font_generator

Licence: MIT license
☣️ Flutter Icon Font Generator

Programming Languages

dart
5743 projects
objective c
16641 projects - #2 most used programming language
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to icon font generator

Ttfunk
Font Metrics Parser for Prawn
Stars: ✭ 108 (+58.82%)
Mutual labels:  ttf
Ttf Parser
A high-level, safe, zero-allocation TrueType font parser.
Stars: ✭ 221 (+225%)
Mutual labels:  ttf
fontagon
Fontagon is a great tool that easily converts svg into icon font. Fontagon-cli allows faster conversion to commands.
Stars: ✭ 18 (-73.53%)
Mutual labels:  ttf
Svgtofont
Read a set of SVG icons and ouput a TTF/EOT/WOFF/WOFF2/SVG font.
Stars: ✭ 149 (+119.12%)
Mutual labels:  ttf
Web Font
字体裁剪工具
Stars: ✭ 203 (+198.53%)
Mutual labels:  ttf
Neodgm
Modern TrueType font based on an old-but-good Korean bitmap font.
Stars: ✭ 230 (+238.24%)
Mutual labels:  ttf
Mikhak
simple monoline Arabic-Latin semi handwriting typeface
Stars: ✭ 64 (-5.88%)
Mutual labels:  ttf
Acy-Font
自制手写字体。A hand-writing font set.
Stars: ✭ 20 (-70.59%)
Mutual labels:  ttf
Fonteditor Core
fonteditor core functions
Stars: ✭ 207 (+204.41%)
Mutual labels:  ttf
apple-emoji-linux
Apple Color Emoji for Linux
Stars: ✭ 392 (+476.47%)
Mutual labels:  ttf
Webfonts Loader
Make an icon font from SVGs!
Stars: ✭ 153 (+125%)
Mutual labels:  ttf
Webfont
Awesome generator of webfont
Stars: ✭ 170 (+150%)
Mutual labels:  ttf
Typography
C# Font Reader (TrueType / OpenType / OpenFont / CFF / woff / woff2) , Glyphs Layout and Rendering
Stars: ✭ 246 (+261.76%)
Mutual labels:  ttf
Haack
Hæck
Stars: ✭ 142 (+108.82%)
Mutual labels:  ttf
FontRegister
FontRegister is a small Windows utility to install fonts and/or repair the font registry via commandline.
Stars: ✭ 17 (-75%)
Mutual labels:  ttf
Php Font Lib
A library to read, parse, export and make subsets of different types of font files.
Stars: ✭ 1,530 (+2150%)
Mutual labels:  ttf
Hack
A typeface designed for source code
Stars: ✭ 14,543 (+21286.76%)
Mutual labels:  ttf
MaterialDesign-Font
Distribution Repo for the TTF font
Stars: ✭ 102 (+50%)
Mutual labels:  ttf
lv lib freetype
Interface to FreeType to generate font bitmaps run time
Stars: ✭ 41 (-39.71%)
Mutual labels:  ttf
LxgwClearGothic
A Chinese sans-serif font derived from IPAex Gothic. 一款衍生于「IPAexゴシック」的中文黑体字型。
Stars: ✭ 106 (+55.88%)
Mutual labels:  ttf

Flutter Icon Font Generator

Pub

Convert all *.svg icons from dir to icon-font (.ttf) and generates flutter compatible dart class.

Abstraction layer for NodeJs package fantasticon.

Requirements

Node.JS v11+

Install:

$ pub global activate icon_font_generator

Params:

* - required

  • --from * - Input dir with svg's
  • --out-font * - Output icon font path (to file, for example: lib/font.ttf)
  • --out-flutter * - Output flutter icon class (to file, for example: lib/icons.dart)
  • --class-name * - The class name is also the font name used in pubspec.yaml (as font name)
  • --height - Fixed font height value, defaults: 512
  • --descent - Offset applied to the baseline, defaults: 240
  • --package - Name of package for generated icon data (See more)
  • --indent - Indent for generating dart file, for example: ' ', default: ' '
  • --normalize - Normalize icons sizes, default: false
  • --yarn - Usage yarn instead npm, default: false
  • --naming-strategy - Icons name strategy: snake (yaru_icon) or camel (yaruIcon), default: snake

Example

File structure:

project
└───icons
│   │   account.svg
│   │   arrow_left.svg
│   │   arrow_right.svg
│   │   collection.svg
│   
└───lib
│   │   icon_font
│   │   widgets

Run command:

$ icon_font_generator --from=icons --class-name=UiIcons --out-font=lib/icon_font/ui_icons.ttf --out-flutter=lib/widgets/icons.dart

Generates:

project
└───icons
│   │   account.svg
│   │   arrow_left.svg
│   │   arrow_right.svg
│   │   collection.svg
│   
└───lib
│   └───widgets
│   |   │   icons.dart
│   │
│   └───icon_font
│       │   ui_icons.ttf

Generated icons.dart:

// GENERATED CODE - DO NOT MODIFY BY HAND

import 'package:flutter/widgets.dart';

@immutable
class _UiIconsData extends IconData {
  const UiIconsData(int codePoint)
      : super(
          codePoint,
          fontFamily: 'UiIcons',
        );
}

@immutable
class UiIcons {
  const UiIcons._();

  static const IconData account = _UiIconsData(0xe000);
  static const IconData arrowLeft = _UiIconsData(0xe001);
  static const IconData arrowRight = _UiIconsData(0xe002);
  static const IconData collection = _UiIconsData(0xe003);
}

And also need add font to pubspec.yaml:

...

flutter:
  fonts:
    - family: UiIcons
      fonts:
        - asset: lib/src/icon_font/ui_icons.ttf
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].