Skip to content

A Zig library to work with Unified Font Objects (mirror)

License

Notifications You must be signed in to change notification settings

sansfontieres/offu

Repository files navigation

Offu

A library to parse and edit Unified Font Objects v3 written in Zig.

The goal is to have a library to rely on for tools such as a non-exporting glyphs remover, a UFO normalizer, running Q.A. tests, or parsing the necessary information to build fonts, etc.

There are still some rough edges (only partial reading is supported so far!).
This library follows Zig master releases, a nix flake helps with that.

Features

No Python.

Installation

; zig fetch --save git+https://git.sr.ht/~romi/offu#front
pub fn build(b: *std.Build) void {
    const target = b.standardTargetOptions(.{});
    const optimize = b.standardOptimizeOption(.{});

    const offu = b.dependency("offu", .{
        .target = target,
        .optimize = optimize,
    }).module("offu");

    const exe = b.addExecutable(.{
        .name = "my-project",
        .root_source_file = b.path("src/main.zig"),
        .target = target,
        .optimize = optimize,
    });
    exe.root_module.addImport("offu", offu);
}

Examples

Browse the examples directory.

; zig build examples

Docs

API: https://sansfontieres.com/docs/offu

About

A Zig library to work with Unified Font Objects (mirror)

Topics

Resources

License

Stars

Watchers

Forks