#font #embedded-graphics #graphics #bitmap

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

#675 in Embedded development

27 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