#embedded-graphics #font #graphics #bitmap

无 std bitmap-font

为嵌入式图形库提供的位图字体,无需泛型

7 个不稳定版本

0.3.0 2023年5月15日
0.2.2 2022年1月13日
0.2.1 2021年6月9日
0.1.1 2021年6月8日
0.0.1 2021年4月2日

#23 in #embedded-graphics

Download history

261 每月下载量

Apache-2.0

460KB
3K SLoC

bitmap-font Rust 1.61+ License Apache-2.0 GitHub

此包为嵌入式图形库提供位图字体。这些字体不仅比内置字体更美观,使用了好看的 Tamzen 字体,而且在字体渲染上比像 . 这样的 + 更好,而且还允许通过像素加倍来缩放字体,为较小的闪存大小要求提供两个字体大小。

查看 tamzen 模块以获取包含的所有字体的列表。

使用方法

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 政策

此包保证始终使用最新稳定的 Rust 版本进行构建。MSRV 已有文档记录;然而,仅作信息参考。更改 MSRV 可以在任何时候进行,且不被视为重大更改。

许可(源代码)

版权 (C) 2021-2022 Dominic Meiser 及 贡献者

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.

许可(位图字体)

本许可适用于包含在此包中的原始位图字体数据。

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.

依赖关系

~3MB
~35K SLoC