[][src]Crate fontstash

Wrapper of fontstash

Custom renderer

fontstash-rs can be used with any graphics API, but it doesn't contain a default renderer.

You can pull FONSquads via FonsTextIter and batch them to make draw calls. The original fontstash had callback-based drawing, but it was excluded from this crate.

Multi line text

Note that fontstash-rs doesn't handle multiple lines. You have to draw or measure text line by line by yourself.

TODOs

  • support state push/pop

Re-exports

pub use fontstash_sys as sys;

Structs

FonsTextIter

Iterator of text quads

FontIx
FontStash

Font stash

Enums

Align
ErrorCode

Error code supplied to [ErrorCallBack]

Flags
FonsError

Traits

Renderer

Set of callbacks

Functions

set_error_callback

Type Definitions

ErrorCallback

The error argument is actually ErrorCode

Result