PaperForge.Fonts.TrueType.Subsetter (PaperForge v0.5.0)

Copy Markdown View Source

Builds physical TrueType subsetting plans.

This module does not yet rewrite the final .ttf program. It provides the deterministic planning pieces needed for that step: binary hashes, composite glyph dependency expansion, table selection, and TrueType checksum calculation.

Summary

Types

plan()

@type plan() :: %{
  binary_hash: binary(),
  requested_glyphs: [non_neg_integer()],
  glyphs: [non_neg_integer()],
  composite_dependencies: [non_neg_integer()],
  rebuild_tables: [binary()],
  checksums: %{optional(binary()) => non_neg_integer()}
}

Functions

binary_hash(data)

@spec binary_hash(binary()) :: binary()

checksum(data)

@spec checksum(binary()) :: non_neg_integer()

checksums(tables)

@spec checksums(%{optional(binary()) => binary()}) :: %{
  optional(binary()) => non_neg_integer()
}

plan(font, glyph_ids)