Skip to content

Commit

Permalink
v0.1.5
Browse files Browse the repository at this point in the history
added a new font, and other minor changes
  • Loading branch information
Localghost385 committed May 27, 2024
1 parent 5ddb48c commit cfc9094
Show file tree
Hide file tree
Showing 6 changed files with 612 additions and 101 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

### v0.1.5
- added new font (pipes)
- optimized message generation
- fixed some formatting problems, etc.

### v0.1.4
- major restructuring.
- fonts are now parsed from a toml file, so they are easier to add.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "glyphrs"
version = "0.1.4"
version = "0.1.5"
edition = "2021"
license = "MIT"
description = "A text art generator written in Rust"
Expand Down
8 changes: 2 additions & 6 deletions src/fonts/font_handling.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::collections::HashMap;
use serde::Deserialize;

use std::collections::HashMap;

#[derive(Debug, Deserialize)]
struct Outer {
Expand All @@ -14,9 +13,6 @@ struct Font {
key_values: Vec<Vec<String>>,
}




pub fn get_fonts() -> Vec<String> {
let fonts = define_fonts();
let mut font_list: Vec<String> = vec![];
Expand All @@ -38,7 +34,7 @@ fn get_font_file() -> &'static str {
pub fn define_fonts() -> HashMap<String, HashMap<char, Vec<String>>> {
let mut fonts: HashMap<String, HashMap<char, Vec<String>>> = HashMap::new();
let contents = get_font_file();
let toml_value: Outer =toml::from_str(&contents).expect("Failed to parse config.toml");
let toml_value: Outer = toml::from_str(contents).expect("Failed to parse config.toml");

for font in toml_value.fonts {
let mut font_map: HashMap<char, Vec<String>> = HashMap::new();
Expand Down
Loading

0 comments on commit cfc9094

Please sign in to comment.