Skip to content

Commit

Permalink
Removed All fonts for iced_aw in place of iced_fonts. Use this instead.
Browse files Browse the repository at this point in the history
Re-exported Iced_fonts for the Required Font.
  • Loading branch information
genusistimelord committed Sep 19, 2024
1 parent 59e89dd commit 7d14e42
Show file tree
Hide file tree
Showing 35 changed files with 125 additions and 32,397 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changes
- (Breaking) Removed Fonts and replaced with iced_fonts.

## [0.10.0] - 2024-09-18

Expand Down
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ rust-version = "1.80"
[features]
badge = []
card = []
date_picker = ["chrono", "icons"]
color_picker = ["icons", "iced/canvas"]
cupertino = ["time", "iced/canvas", "icons"]
date_picker = ["chrono"]
color_picker = ["iced/canvas"]
cupertino = ["time", "iced/canvas"]
grid = ["itertools"]
glow = [] # TODO
icons = []
tab_bar = []
tabs = ["tab_bar"]
time_picker = ["chrono", "icons", "iced/canvas"]
time_picker = ["chrono", "iced/canvas"]
wrap = []
number_input = ["num-format", "num-traits", "typed_input"]
typed_input = []
Expand Down Expand Up @@ -67,6 +66,7 @@ itertools = { version = "0.13.0", optional = true }
num-format = { version = "0.4.4", optional = true }
num-traits = { version = "0.2.19", optional = true }
time = { version = "0.3.36", features = ["local-offset"], optional = true }
iced_fonts = "0.1.1"

[dependencies.iced]
#git = "https://github.com/iced-rs/iced.git"
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,3 @@ Quickstart features are pretty handy to start and experiment having everything l

This crate adds a predefined color palette based on the [CSS color palette](https://www.w3schools.com/cssref/css_colors.asp).

### Bootstrap icons

Thanks to [Bootstrap](https://icons.getbootstrap.com), iced_aw now contains ~1,200 icons to be used in an Iced GUI.

Enable icons with the feature `icons`.

*Note: the icon font with ~1,200 weights around 0.274 MB. This features should only be used for experimenting with all the icons.*
2 changes: 1 addition & 1 deletion examples/card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use iced_aw::{helpers::card, style};

fn main() -> iced::Result {
iced::application("Card example", CardExample::update, CardExample::view)
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.run()
}

Expand Down
2 changes: 1 addition & 1 deletion examples/color_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() -> iced::Result {
ColorPickerExample::update,
ColorPickerExample::view,
)
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.run()
}

Expand Down
2 changes: 1 addition & 1 deletion examples/date_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn main() -> iced::Result {
DatePickerExample::update,
DatePickerExample::view,
)
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.run()
}

Expand Down
2 changes: 1 addition & 1 deletion examples/drop_down.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn main() -> iced::Result {
DropDownExample::update,
DropDownExample::view,
)
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.run()
}

Expand Down
2 changes: 1 addition & 1 deletion examples/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,6 @@ fn string_to_vertical_align(input: &str) -> Vertical {

fn main() -> iced::Result {
iced::application("Grid example", App::update, App::view)
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.run()
}
15 changes: 7 additions & 8 deletions examples/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ use iced_aw::menu::{self, Item, Menu};
use iced_aw::style::{menu_bar::primary, Status};
use iced_aw::{menu_bar, menu_items};
use iced_aw::{quad, widgets::InnerBounds};
use iced_aw::{Bootstrap, BOOTSTRAP_FONT, BOOTSTRAP_FONT_BYTES};
use iced_fonts::required::{icon_to_string, RequiredIcons};
use iced_fonts::REQUIRED_FONT;

pub fn main() -> iced::Result {
iced::application(App::title, App::update, App::view)
.theme(App::theme)
.font(BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.window_size(Size::new(1000.0, 600.0))
.run()
}
Expand Down Expand Up @@ -492,12 +493,10 @@ fn submenu_button(label: &str) -> button::Button<Message, iced::Theme, iced::Ren
text(label)
.width(Length::Fill)
.align_y(alignment::Vertical::Center),
text(iced_aw::bootstrap::icon_to_string(
Bootstrap::CaretRightFill
))
.font(BOOTSTRAP_FONT)
.width(Length::Shrink)
.align_y(alignment::Vertical::Center),
text(icon_to_string(RequiredIcons::CaretRightFill))
.font(REQUIRED_FONT)
.width(Length::Shrink)
.align_y(alignment::Vertical::Center),
]
.align_y(iced::Alignment::Center),
Message::Debug(label.into()),
Expand Down
2 changes: 1 addition & 1 deletion examples/number_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn main() -> iced::Result {
width: 250.0,
height: 200.0,
})
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.run()
}

Expand Down
2 changes: 1 addition & 1 deletion examples/selection_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use iced_aw::{selection_list::SelectionList, style::selection_list::primary};

pub fn main() -> iced::Result {
iced::application("Selection list example", Example::update, Example::view)
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.run()
}

Expand Down
2 changes: 1 addition & 1 deletion examples/slide_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() -> iced::Result {
SlideBarExample::update,
SlideBarExample::view,
)
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.run()
}

Expand Down
2 changes: 1 addition & 1 deletion examples/spinner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fn main() -> iced::Result {
SpinnerExample::update,
SpinnerExample::view,
)
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.theme(SpinnerExample::theme)
.run()
}
2 changes: 1 addition & 1 deletion examples/tab_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn main() -> iced::Result {
TabBarExample::update,
TabBarExample::view,
)
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.run()
}

Expand Down
2 changes: 1 addition & 1 deletion examples/time_picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn main() -> iced::Result {
TimePickerExample::update,
TimePickerExample::view,
)
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.run()
}

Expand Down
2 changes: 1 addition & 1 deletion examples/typed_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn main() -> iced::Result {
width: 250.0,
height: 200.0,
})
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.run()
}

Expand Down
2 changes: 1 addition & 1 deletion examples/widget_id_return/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn main() -> iced::Result {
NumberInputDemo::update,
NumberInputDemo::view,
)
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.run()
}

Expand Down
2 changes: 1 addition & 1 deletion examples/wrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use rand::Rng;

fn main() -> iced::Result {
iced::application("Wrap example", RandStrings::update, RandStrings::view)
.font(iced_aw::BOOTSTRAP_FONT_BYTES)
.font(iced_fonts::REQUIRED_FONT_BYTES)
.run()
}

Expand Down
12 changes: 0 additions & 12 deletions src/core.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//! `iced_aw_core`.
use cfg_if::cfg_if;

#[cfg(feature = "date_picker")]
pub mod date;

Expand All @@ -22,13 +20,3 @@ pub mod offset;

#[cfg(feature = "drop_down")]
pub mod alignment;

pub mod icons;

cfg_if! {
if #[cfg(feature = "icons")] {
pub use icons::{BOOTSTRAP_FONT, BOOTSTRAP_FONT_BYTES, NERD_FONT, NERD_FONT_BYTES, Bootstrap, Nerd, bootstrap, nerd};
} else {
pub use icons::{BOOTSTRAP_FONT, BOOTSTRAP_FONT_BYTES, Bootstrap, bootstrap};
}
}
Binary file removed src/core/fonts/bootstrap-icons.ttf
Binary file not shown.
Binary file removed src/core/fonts/nerd-icons.ttf
Binary file not shown.
Binary file removed src/core/fonts/required-icons.ttf
Binary file not shown.
41 changes: 0 additions & 41 deletions src/core/icons.rs

This file was deleted.

Loading

0 comments on commit 7d14e42

Please sign in to comment.