Crate swash

source ·
Expand description

Font introspection, complex text shaping and glyph rendering.

For a comprehensive list of features provided by this crate, please check out the readme on GitHub.


This is a low level library focusing on implementations of OpenType and various related Unicode specifications for building high quality, high performance text layout and rendering components with minimal overhead.

If you’re looking for something higher level, please stay tuned– work is in progress.


The primary currency in this crate is the FontRef struct so you’ll want to start there to learn how to construct and use fonts.

Documentation for shaping and scaling is provided in the respective modules.



  • Collection of various iterators over metadata contained in a font.
  • Proxies used to efficiently rematerialize metadata.
  • Scaling, hinting and rasterization of visual glyph representations.
  • Mapping complex text to a sequence of positioned glyphs.
  • Character properties and textual analysis.


  • Primary attributes for font classification: stretch, weight and style.
  • Collection of bitmaps of a specific size and format.
  • Uniquely generated value for identifying and caching fonts.
  • Maps characters to nominal glyph identifiers.
  • Collection of colors.
  • Typographic rule that produces modifications to a sequence of glyphs.
  • Reference to the content of a font file.
  • Reference to a font.
  • Glyph advances, side bearings and vertical origins.
  • Named instance in a variable font.
  • Represents a single localized string in a font.
  • Global font metrics.
  • Angle of an oblique style in degrees from -90 to 90.
  • Setting combining a tag and a value for features and variations.
  • Visual width of a font– a relative change from the normal aspect ratio.
  • Synthesis suggestions for mismatched font attributes.
  • Axis of variation in a variable font.
  • Visual weight class of a font on a scale from 1 to 1000.
  • Script, language and associated typographic features available in a font.


  • Modification performed by a feature.
  • Identifier for well-known localized strings in a font.
  • Visual style or ‘slope’ of a font.
  • Theme of a palette with respect to background color.



Type Aliases§