#true-type #ui #graphics

verglas

🧊 Iced SVG icon font generator

3 releases

0.1.2 Jan 29, 2025
0.1.1 Jan 17, 2025
0.1.0 Dec 22, 2024

#244 in GUI

Download history 101/week @ 2024-12-21 4/week @ 2024-12-28 6/week @ 2025-01-04 59/week @ 2025-01-11 61/week @ 2025-01-18 103/week @ 2025-01-25 30/week @ 2025-02-01 4/week @ 2025-02-08

254 downloads per month
Used in partout

MIT license

41KB
826 lines

verglas

Documentation crates.io License Downloads

🧊 Iced SVG icon font generator

Introduction

This crate can be added as a build dependency to automatically generate a TrueType font (.ttf file) from SVG icons in a directory for use with the Iced GUI library. Essentially, it aims to provide the functionality of svg2ttf as a pure Rust library.

This library is currently experimental.

For more details, please have a look at the documentation.

The name "verglas" refers to a thin layer of transparent ice that forms on surfaces under certain climatic conditions.

Example

The example showcases how different SVG icon sets (in particular a subset of Jam icons and some custom icons) can be combined into a font and loaded in an Iced app.

Build and run the example with:

cargo run --locked --package example

Development

Contributions are very welcome!

While I initially developed verglas for Iced, I hope it will be useful for other use cases that I haven't thought of yet.

Libraries used:

  • usvg for parsing and simplifying SVG files
  • kurbo for converting cubic Bézier curves to quadratic Bézier curves
  • Crates from the fontations project for reading and writing fonts

More helpful links:

Notes:

  • Set flag --all-features for cargo commands to activate all features of all packages

Dependencies

~3–4.5MB
~99K SLoC