#graphics #bitmap #font #no-std

no-std bitmap-font

Bitmap fonts for the embedded-graphics crate that don't require generics

7 unstable releases

0.3.0 May 15, 2023
0.2.2 Jan 13, 2022
0.2.1 Jun 9, 2021
0.1.1 Jun 8, 2021
0.0.1 Apr 2, 2021

#284 in Embedded development

Download history 11/week @ 2023-10-21 24/week @ 2023-10-28 10/week @ 2023-11-04 8/week @ 2023-11-11 16/week @ 2023-11-18 39/week @ 2023-11-25 4/week @ 2023-12-02 16/week @ 2023-12-09 9/week @ 2023-12-16 27/week @ 2023-12-23 6/week @ 2023-12-30 48/week @ 2024-01-06 40/week @ 2024-01-13 26/week @ 2024-01-20 72/week @ 2024-01-27 53/week @ 2024-02-03

197 downloads per month

Apache-2.0

460KB
3K SLoC

bitmap-font Rust 1.61+ License Apache-2.0 GitHub

This crate provides bitmap fonts for the embedded-graphics crate. Those don’t only look better than the built-in fonts by using the good-looking Tamzen font over a font that renders . like a +, but also allow scaling fonts by pixel-doubling them, giving you two font sizes for the flash size requirements of the smaller one.

See the tamzen module for a list of all included fonts.

Usage

use bitmap_font::{tamzen::FONT_8x15, BitmapFont, TextStyle};
use embedded_graphics::{pixelcolor::BinaryColor, prelude::*, text::Text};

// Draw text 'Hello World!' with the top left corner being the origin
let text = Text::new(
	"Hello World!",
	Point::zero(),
	TextStyle::new(&FONT_8x15, BinaryColor::On)
);
text.draw(&mut display)?;

MSRV Policy

This crate is guaranteed to always build with the latest stable rust version. MSRV is documented; however, for your information only. Changing the MSRV can be done at any point in time and is not considered a breaking change.

License (Source Code)

Copyright (C) 2021-2022 Dominic Meiser and contributors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

License (Bitmap Font)

This license applies to the raw bitmap font data included in this crate.

Copyright 2011 Suraj N. Kurapati <https://github.com/sunaku/tamzen-font>

Tamzen font is free.  You are hereby granted permission to use, copy, modify,
and distribute it as you see fit.

Tamzen font is provided "as is" without any express or implied warranty.

The author makes no representations about the suitability of this font for
a particular purpose.

In no event will the author be held liable for damages arising from the use
of this font.

Dependencies

~3MB
~35K SLoC