Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bdf-parser/src/glyph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub struct Glyph {
}

fn parse_bitmap_row(line: &Line<'_>, bitmap: &mut Vec<u8>) -> Result<(), ()> {
if !line.parameters.is_empty() || line.keyword.len() % 2 != 0 {
if !line.parameters.is_empty() || !line.keyword.len().is_multiple_of(2) {
return Err(());
}

Expand Down
2 changes: 1 addition & 1 deletion eg-bdf-examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ publish = false

[dependencies]
embedded-graphics = "0.8.1"
embedded-graphics-simulator = "0.7.0"
embedded-graphics-simulator = "0.8.0"
# TODO: add non path dependency
eg-bdf = { path = "../eg-bdf" }
eg-font-converter = { path = "../eg-font-converter" }
Expand Down
2 changes: 1 addition & 1 deletion eg-bdf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ keywords = ["embedded-graphics", "font", "bdf"]
embedded-graphics = "0.8.1"

[dev-dependencies]
embedded-graphics-simulator = "0.7.0"
embedded-graphics-simulator = "0.8.0"
2 changes: 1 addition & 1 deletion eg-font-converter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ anyhow = "1.0.98"
bdf-parser = { version = "0.1.0", path = "../bdf-parser" }
eg-bdf = { path = "../eg-bdf" }
embedded-graphics = "0.8.1"
embedded-graphics-simulator = { version = "0.7.0", default-features = false }
embedded-graphics-simulator = { version = "0.8.0", default-features = false }
bitvec = "1.0.1"
syn = { version = "2.0.104", default-features = false, features = ["full", "parsing"] }
prettyplease = "0.2.35"
Expand Down
13 changes: 8 additions & 5 deletions eg-font-converter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,15 @@ impl<'a> FontConverter<'a> {
.iter()
.copied()
.map(|c| {
let glyph_c =
if bdf.glyphs.get(c).is_none() && self.missing_glyph_substitute.is_some() {
self.missing_glyph_substitute.unwrap()
} else {
let glyph_c = if let Some(substitute) = self.missing_glyph_substitute {
if bdf.glyphs.get(c).is_some() {
c
};
} else {
substitute
}
} else {
c
};

bdf.glyphs
.get(glyph_c)
Expand Down
2 changes: 1 addition & 1 deletion eg-font-converter/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::path::PathBuf;

use anyhow::{anyhow, Context, Result};
use clap::{command, Parser};
use clap::Parser;
use eg_font_converter::FontConverter;
use embedded_graphics::mono_font::mapping::Mapping;

Expand Down
2 changes: 1 addition & 1 deletion tools/test-bdf-parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ owo-colors = "4.2.2"
clap = { version = "4.5.40", features = [ "derive" ] }
anyhow = "1.0.98"
embedded-graphics = "0.8.1"
embedded-graphics-simulator = { version = "0.7.0", default-features = false }
embedded-graphics-simulator = { version = "0.8.0", default-features = false }