#glow #true-type #font #text

glow_glyph

由glyph_brush驱动的glow快速文本渲染器

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 数据格式

Download history 590/week @ 2024-05-05 620/week @ 2024-05-12 881/week @ 2024-05-19 709/week @ 2024-05-26 614/week @ 2024-06-02 433/week @ 2024-06-09 605/week @ 2024-06-16 568/week @ 2024-06-23 387/week @ 2024-06-30 416/week @ 2024-07-07 591/week @ 2024-07-14 597/week @ 2024-07-21 543/week @ 2024-07-28 512/week @ 2024-08-04 692/week @ 2024-08-11 592/week @ 2024-08-18

2,440 每月下载量
19 个crate中使用(通过 iced_glow

MIT 许可证

76KB
1.5K SLoC

glow_glyph

Integration status crates.io Documentation License

glowglyph_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