Giter Site home page Giter Site logo

huozi-rs's Introduction

huóRust

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

(功能尚在开发中)

docs.rs

总览

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

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

Roadmap

  • 字形生成和缓存
  • WGPU 渲染范例
  • 描边、阴影
  • 多种字体格式
  • 颜色
  • 下划线、删除线
  • 输出为图片或纹理,提供顶点坐标和纹理坐标
  • W3C 汉字排版需求
  • 支持更多文字效果
  • 通过 WebAssembly 支持 Web 平台

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

Any translation is welcome!

使用

见 examples 目录。

huozi-rs's People

Contributors

icemic avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.