10 个版本 (破坏性更新)
0.7.0 | 2024年5月19日 |
---|---|
0.5.1 | 2022年5月10日 |
0.5.0 | 2021年12月17日 |
0.4.0 | 2020年11月10日 |
0.3.0 | 2020年7月27日 |
#20 in 数据格式
2,440 每月下载量
在 19 个crate中使用(通过 iced_glow)
76KB
1.5K SLoC
glow_glyph
由 glow 和 glyph_brush 驱动的快速文本渲染器
use glow_glyph::{Section, GlyphBrushBuilder};
let font: &[u8] = include_bytes!("SomeFont.ttf");
let mut glyph_brush = GlyphBrushBuilder::using_font_bytes(font)
.expect("Load font")
.build(&glow_context);
let section = Section {
text: "Hello glow_glyph",
..Section::default() // color, position, etc
};
glyph_brush.queue(section);
glyph_brush.queue(some_other_section);
glyph_brush.draw_queued(
&glow_context,
window_width,
window_height,
);
示例
查看以下内容:
cargorun --examplehello
cargorun --exampleclipping
依赖项
~4–5.5MB
~116K SLoC