Crate ttf_parser

Source
Expand description

A high-level, safe, zero-allocation TrueType font parser.

§Features

  • A high-level API, for people who doesn’t know how TrueType works internally. Basically, no direct access to font tables.
  • Zero heap allocations.
  • Zero unsafe.
  • Zero dependencies.
  • no_std/WASM compatible.
  • Fast.
  • Stateless. All parsing methods are immutable methods.
  • Simple and maintainable code (no magic numbers).

§Safety

  • The library must not panic. Any panic considered as a critical bug and should be reported.
  • The library forbids the unsafe code.
  • No heap allocations, so crash due to OOM is not possible.
  • All recursive methods have a depth limit.
  • Technically, should use less than 64KiB of stack in worst case scenario.
  • Most of arithmetic operations are checked.
  • Most of numeric casts are checked.

Modules§

Structs§

Enums§

Traits§

Functions§