An open API service indexing awesome lists of open source software.

https://github.com/icemic/huozi-rs

(WIP) A simple typography engine for CJK languages, especially designed for game rich-text.
https://github.com/icemic/huozi-rs

Last synced: 12 months ago
JSON representation

(WIP) A simple typography engine for CJK languages, especially designed for game rich-text.

Awesome Lists containing this project

README

          


活huó字zìRust



一个简单的中日韩文字排印引擎,为游戏富文本特别设计。A simple typography engine for CJK languages, especially designed for game rich-text.


(功能尚在开发中)




docs.rs


## 总览

活字(Rust)是 [huozi.js](https://github.com/Icemic/huozi.js) 的新一代版本,不同于后者而使用 Rust 实现,其具有以下特点:

- 使用 SDF(Signed Distance Field)技术渲染字形
- 动态 SDF 字形生成和缓存,支持同时渲染最多 1024 个不同字形
- 支持多种排印效果,包括描边、阴影等
- 支持多种字体格式,包括 TTF、OTF
- 支持多种文字效果,包括下划线、删除线、颜色等(开发中)
- 输出为图片或者纹理,并提供顶点坐标和纹理坐标,方便与任意渲染引擎集成
- 支持[W3C 汉字排版需求](https://www.w3.org/TR/clreq/),包括行内标点压缩、行内引号位置修正等(开发中)

## Roadmap

- [x] 字形生成和缓存
- [x] [WGPU](https://github.com/gfx-rs/wgpu) 渲染范例
- [x] 描边、阴影
- [x] 多种字体格式
- [x] 颜色
- [ ] 下划线、删除线
- [x] 输出为图片或纹理,提供顶点坐标和纹理坐标
- [ ] W3C 汉字排版需求
- [ ] 支持更多文字效果
- [x] 支持 Windows、macOS、Linux、Android、iOS、Web (WebAssembly) 平台

尚在早期开发阶段(咕),尤其是排版功能高度缺失,欢迎任何 Issue 和 Pull Request!

Any translation is welcome!

## 使用

见 examples 目录。