Skip to content

Commit

Permalink
Bump u8g2 to v2.35.30 (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
Finomnis authored Dec 10, 2024
1 parent 231d494 commit 3cfd508
Show file tree
Hide file tree
Showing 7 changed files with 501 additions and 358 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "u8g2-fonts"
version = "0.4.0"
version = "0.5.0"
edition = "2021"
rust-version = "1.62"
license-file = "LICENSE"
Expand Down Expand Up @@ -33,7 +33,7 @@ embedded-graphics-core = "0.4.0"
embedded-graphics = { version = "0.8.0", optional = true }

[dev-dependencies]
image = "0.25.2"
image = "0.25.5"
base64 = "0.22.1"

[package.metadata.docs.rs]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ If we [replace the text rendering section](examples/simulator/src/bin/embedded_g

![Embedded-graphics example with our U8g2 font](assets/embedded_graphics_hello_world.png?raw=true)

Note that the letter `i` sits snuck in between the `h` and the `c`, compared to the original example. This is not a monospace font.
Note that the letter `i` sits snug in between the `h` and the `c`, compared to the original example. This is not a monospace font.
4 changes: 2 additions & 2 deletions src/font_reader/glyph_searcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub struct GlyphSearcher<'a, const CHAR_WIDTH: usize> {
font: &'a FontReader,
}

impl<'a, const CHAR_WIDTH: usize> GlyphSearcher<'a, CHAR_WIDTH> {
impl<const CHAR_WIDTH: usize> GlyphSearcher<'_, CHAR_WIDTH> {
pub fn jump_by(&mut self, offset: usize) {
self.data = &self.data[offset..];
}
Expand Down Expand Up @@ -61,7 +61,7 @@ impl<'a> GlyphSearcher<'a, 1> {
}
}

impl<'a> GlyphSearcher<'a, 2> {
impl GlyphSearcher<'_, 2> {
pub fn get_ch(&self) -> u16 {
u16::from_be_bytes([
self.data.first().cloned().unwrap(),
Expand Down
276 changes: 243 additions & 33 deletions src/fonts.rs

Large diffs are not rendered by default.

Loading

0 comments on commit 3cfd508

Please sign in to comment.