Skip to content

project-gauntlet/iced_fonts

 
 

Repository files navigation

iced_fonts

Include fonts via feature flags in your Iced project!

Documentation Crates.io License Downloads Discourse Discord Server

Usage

use iced_fonts::{LUCIDE_FONT_BYTES, lucide::*};
    
fn view(&self) -> Element<Message> {
    row![
        git_branch(),
        git_commit_horizontal(),
        git_merge(),
        git_pull_request(),
        github(),
        gitlab(),
    ]
}

Include iced_fonts as a dependency in your Cargo.toml:

[dependencies]
iced_fonts = { version = "0.2.0", features = [...] }

Versioning

iced version iced_fonts version
0.13.x 0.1.x, 0.2.x
0.14.x master branch

Fonts

Fonts can all be enabled with feature flags. All the fonts can be enabled with the full feature flag. By default there are no fonts added.

NOTE: By enabling a feature flag you add the full size of the font file(s) to your binary.

The Following are a link to the source followed by their feature flag name.

Bring your own Font!

One problem people bring up is that they only need a few icons. So the macro used by this library is exported for public use. See the custom example.

Failed fonts.

Saddly some fonts are not supported because they are not given proper names in the post table. This is a failure of the font author and there is nothing we can do about these. We cannot generate/lookup names that are not in the font. The currently list of these follows

  • Material Icons (avaiable via nerd font)
  • Weather Icons (avaiable via nerd font)

Contributing

If you would like to request a new font, please open an issue with the font's name and where to download the ttf file from.

Roadmap

Somethings that need to be done are.

  1. Use basic shaping where possible, we shouldn't pay a fee we aren't required to.
  2. Add more useful fonts if possible, this depends on if they have properly setup tables.
  3. Look into svg support. Once a demo is done it's easy to make a proc macro for it.

About

Include fonts via feature flags in your Iced project!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 85.3%
  • Nix 10.9%
  • Shell 3.8%