fontify_plus 0.6.0
fontify_plus: ^0.6.0 copied to clipboard
Converts SVG icons to an OTF font and generates a Flutter-compatible class. Outlines stroked icons so outline-style sets render correctly. CLI and API.
Changelog #
Unreleased #
0.6.0 #
-
Mixed-width SVGs under
stroke_width_rangeproduce one warning listing every file, not one warning per file. Widths that differ only by float noise are treated as the same. -
Generated class constants are
fontFamily/fontPackage(wasiconFontFamily/iconFontPackage). -
Variable stroke width:
stroke_width_range/--stroke-width-range/strokeWidthRangeemits a CFF2 font whosewghtaxis is the SVG stroke width (e.g.Icon(..., weight: 1.33)). Optionaldefault_stroke_width/--default-stroke-width/defaultStrokeWidthmoves the default off the range maximum to a width strictly inside it. Omitting it leaves output byte-identical to the range-only path. Seedoc/variable_stroke.md. -
Fix icon codepoints depending on directory listing order. Icons are now sorted by name before charcodes are assigned. If your icons were numbered on a filesystem that did not return them alphabetically, regenerating will renumber them once; regenerate the font and its class together.
-
Fix stroke outlining: joiners follow source tangents (was
IncompatibleMastersExceptionon ~1/5 of chained-cubic sets like Hugeicons); fill holes stay empty; collapsed inner walls and looping handles at the width maximum no longer distort. Smaller outlined fonts (less subdivision, exact 90° round joins). Non-finite stroke widths throwArgumentError. -
IDE SVG previews in generated
IconDatadartdoc (--[no-]preview/ YAMLpreview:, default on): minified markdown images, auto-dropped with a warning over 2 MiB — explicit--previewforces them. -
CLI
--watch; negatable--[no-]recursive/--[no-]verbose; empty SVG dirs fail; recursive icon names use the path relative to the input dir. -
Reuse
headtimestamps when rewriting a font; otherwise a fixed default (no wall clock). -
Breaking for
src/importers: named table constructors; nestedOS2Tableversion groups;.glyf/.loca/.cff/.cff2/.fvar/.statnullable;tableMapread-only. Static output without a stroke range stays byte-identical aside from the size wins above. -
SDK floor is Dart 3.11 (
xml7). -
Known limits: no fvar/STAT read-back yet (#12); OS/2 v2/v3 truncation (#13); interior-default metrics can overflow at the axis maximum (documented, not fixed).
0.5.2 #
- Fix TrueType (
useOpenType: false) output storing SVG cubic control points verbatim as consecutive quadratic off-curve points instead of converting them, which bulged curved outlines outward (a full circle overshot its radius by close to 10% at the diagonals). - Fix
hmtx.lsbbeing hardcoded to zero instead of the glyph's realxMin. TrueType (useOpenType: false) requireshmtx.lsb == glyf.xMin; a mismatch shifts a glyph sideways when rendered. This affects TrueType output in bothnormalizemodes: withnormalize: true, centring zeroes a glyph's pre-conversionxMin, but a curved outline can still land several font units off zero once quadratic-approximated, so the two need not coincide.normalize: falseoutput changes for CFF (OpenType) fonts too —hmtx.lsb, theheadbounding box, andhhea's right-side-bearing/extent now reflect each glyph's real ink bounds instead of a placeholder that assumed every custom glyph filled its whole em square; advance widths are unchanged in every mode and format.
0.5.1 #
normalizedefaults to true again (uniform em fill). Pass--no-normalize/normalize: falseto keep artboard-relative sizes.
0.5.0 #
- Fix font generation (0.4.x could not produce a font). SVG parsing now uses
vector_graphics_compiler; outline-style stroked icons render by default. normalizedefaults to false (artboard → em). Pass--normalizeonly for mismatched viewBoxes.- YAML config is now
defaults+ namedfonts(flatfontify_plus:rejected). CLI flags merge on top;--font=<name>runs one set. - Public job API:
FontJob,parseFontifyConfig,runFontJob/runFontJobs. - Dropped
ignoreShapes, SVG element tree exports, and unused deps. Generated IconData class isabstract final. SDK floor: Dart 3.10.
0.4.3 #
- Remove
collectionpackage dependency
0.4.1 #
- Remove
metapackage dependency
0.4.0 #
- Update Dart SDK constraint to
>=3.0.0 <4.0.0 - Update dependencies
- Refactor codebase with lints package
0.3.0-nullsafety.1 #
- Fix regression related to CLI options (#13)
0.3.0-nullsafety.0 #
- Migrate to null safety
- Fix unknown config parameters causing a crash and add related warnings
0.2.0 #
- IMPORTANT: 'CFF' table is generated now instead of 'CFF2'. It shouldn't affect glyphs in newly generated fonts. To learn more, refer to the issue: https://github.com/4akloon/fontify_plus/issues/8
- PostScript name record in the 'name' table now only contains allowed characters.
- Added CharString optimization to remove some NOOP commands.
0.1.1 #
- Changed values of ascender (to unitsPerEm) and descender (to 0) for non-normalized fonts.
0.1.0 #
fontPackageparameter forIconDataclass can now be provided (thanks @jamie1192).
0.0.3 #
- Fixed glyph metrics in a case where normalization setting is off (thanks @dricholm).
- Formatted code using dartfmt.
0.0.2 #
- CLI tool arguments can now be specified in yaml config (thanks for suggestion @dricholm).
- Fixed lints affecting package score.
0.0.1 #
- Initial release
