~romi/offu

A Zig library to parse and edit Unified Font Objects

0b4e3f1 Clean up docs comments

~romi pushed to ~romi/offu git

7 months ago

8dc97cf Update and comply to latest Zig, update dependency

~romi pushed to ~romi/offu git

7 months ago

#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