eot-parse 1.0.3

Parser for the Embeddable OpenType font format.
Documentation
  • Coverage
  • 1.2%
    1 out of 83 items documented0 out of 8 items with examples
  • Size
  • Source code size: 104.16 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 982.18 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • kiedtl/eot-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kiedtl

eot-parse

A parser for the Microsoft font "standard", Embeddable OpenType. This font format was proposed as a web font standard in 2007 before being discontinued in favor of WOFF.

Unfortunately in the meantime, Microsoft added support for it in PowerPoint (among other products). While PowerPoint no longer embeds fonts in this format as far as I can tell, Google Slides did not get the memo, and so you will still find this format in the wild today, tucked inside a .pptx.

Based on libeot. Similarities are not a coincidence.

Usage

Conversion to TTF:

let data = std::fs::read(inp).unwrap();
let (metadata, out) = eot_parse::eot_to_ttf(&data).unwrap();

Checking the EOT metadata:

let metadata = eot_parse::metadata::read_metadata(&data).unwrap();

Status

This crate faithfully reproduces most of the features and all of the bugs from the original libeot. Tread lightly.

If you find an EOT that this library can't parse, please report it here and not upstream.

NOTE: this crate was originally transpiled from the C library via c2rust. All instances of raw pointers and unsafe has been refactored away, but the code is still un-idiomatic in many cases. Further cleanups are needed.

License

Mozilla Public License 2.0, in compliance with the original license.