harfshapedfa

Crates.ioharfshapedfa
lib.rsharfshapedfa
version0.1.0
created_at2025-10-31 12:16:07.146273+00
updated_at2025-10-31 12:16:07.146273+00
descriptionGlue functionality between skrifa & harfrust
homepage
repositoryhttps://github.com/googlefonts/fontheight
max_upload_size
id1909957
size135,715
Ricky (RickyDaMa)

documentation

README

harfshapedfa

Some glue and utilities to ease working with harfrust and skrifa, continuing the tradition of confusing font-related crate names.

This crate is not affiliated with harfrust or skrifa

What exciting features can you offer?

  • ShapingMeta, to make creating & re-using shaping plans easier
  • Location, a library-agnostic variable font location specifier, mapping axis names to values. Can be validated against a font
  • Conversion functions between script, language, and direction (to harfrust or OpenType types)

The hope would be to see this crate eventually deprecated as the functionality/utilities provided here move into sensible locations in the major font libraries, like harfrust/skrifa/fontations.

Usage

This crate basically expects you to already be using harfrust and skrifa - if you're not this probably isn't the crate for you.

Your Cargo.toml will probably look something like this:

[dependencies]
harfrust = "=0.3.2"
skrifa = "=0.37.0"
harfshapedfa = "0.1"

Note: harfshapedfa pins against very specific version of skrifa and harfrust, as both projects have seen breaking changes on minor releases, usually by bumping read-fonts. By keeping everything in lockstep, we avoid duplicate dependencies and incompatible types due to different versions of the same types being used.

Pens

harfshapedfa also exports pens optionally if you enable the crate's pens feature:

[dependencies]
harfrust = "=0.3.2"
skrifa = "=0.37.0"
harfshapedfa = { version = "0.1", features = ["pens"] }

This provides some pens and re-exports some kurbo types that our API exposes, so if you have a very simple use case you probably won't need to explicitly pull in kurbo.

Commit count: 215

cargo fmt