pbf_font_tools 3.1.0

Tools for working with SDF font glyphs encoded in protobuf format.
Documentation
# Rust PBF Font Tools

[![](https://img.shields.io/crates/v/pbf_font_tools.svg)](https://crates.io/crates/pbf_font_tools) [![](https://docs.rs/pbf_font_tools/badge.svg)](https://docs.rs/pbf_font_tools)

This crate contains tools for working with SDF font glyphs in PBF format for use in renderers
like Mapbox GL.

## Features

* Combine multiple glyphs from multiple fonts into a single stack. 
* Generate glyphs from a TrueType/OpenType font.

If you're looking for a CLI tool to generate PBF ranges en masse like
[node-fontnik](https://github.com/mapbox/node-fontnik)), but faster,
check out [build_pbf_glyphs](https://github.com/stadiamaps/sdf_font_tools/tree/main/build_pbf_glyphs).

The `freetype` feature (which bundles FreeType from source) is used for glyph generation.
Use the `freetype-system` feature instead to link against a system-installed FreeType.

## References

* https://github.com/mapbox/glyph-pbf-composite
* https://github.com/klokantech/tileserver-gl/blob/master/src/utils.js

## protoc

By default, this crate uses a vendored protobuf compiler binary (`protoc`)
to support the widest number of platforms.
You can disable the default features to opt out of this.
NOTE: Some platforms do not have vendored builds available.
In this case, the build will proceed normally as long as `protoc` is available.

When not using the vendored protobuf compiler,
you can ensure `protoc` is accessible in any of the following ways:

* Disabling the default features will look for `protoc` in your `PATH` by default.
* To build from source (requires a C++ compiler), enable the `protoc-from-src` feature.
  Even if you have `protoc` available elsewhere, the source built version will be used instead.
* To use a specific `protoc` that isn't in your `PATH`, set the `PROTOC` environment variable during build.