Crate fontconfig_cache_parser

source ·
Expand description

A crate for parsing fontconfig cache files.

The fontconfig cache format is a C-style binary format, containing a maze of twisty structs all alike, with lots of pointers from one to another. This makes it pretty inefficient to parse the whole file, especially if you’re only interested in a few parts. The expected workflow of this crate is:

  1. You read the cache file into memory (possibly using mmap if the file is large and performance is important).
  2. You construct a Cache, borrowing the memory chunk.
  3. You follow the various methods on Cache to get access to the information you want. As you follow those methods, the data will be read incrementally from the memory chunk you created in part 1.

Modules§

  • Definitions of fontconfig’s raw serialized format.
  • Pointers and offset’s within fontconfig’s cache.

Structs§

Enums§

  • All the possible errors we can encounter when parsing the cache file.
  • All the different object types supported by fontconfig.
  • A dynamically typed value.