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:
- You read the cache file into memory (possibly using
mmap
if the file is large and performance is important). - You construct a
Cache
, borrowing the memory chunk. - 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§
- data
- Definitions of fontconfig’s raw serialized format.
- ptr
- Pointers and offset’s within fontconfig’s cache.
Structs§
- Cache
- The fontconfig cache header.
- CharSet
- A set of code points.
- Char
SetLeaf - A set of bytes, represented as a bitset.
- Char
SetLeaf Iter - An iterator over bits in a
CharSetLeaf
, created byCharSetLeaf::iter
. - FontSet
- A set of fonts.
- Pattern
- A list of properties, each one associated with a range of values.
- Pattern
Elt - A single element of a
Pattern
.