Skip to content
@go-opentype

go-opentype

go-opentype

go-opentype

Pure-Go, zero-dependency TrueType/OpenType text stack.

🌐 Website · 📚 Documentation

Docs License: BSD-3-Clause Go 1.26.4+ Coverage 100%


go-opentype is a family of pure-Go, CGO_ENABLED=0, standard-library-only packages that together read a font file, resolve Unicode bidirectional and complex-script text, and rasterise the result — with no golang.org/x/* anywhere in the stack. It exists to functionally replace, for a Go program that blits glyphs into a pixel buffer, the narrow slice of golang.org/x/image/font a glyph-blitting UI needs, and golang.org/x/text/unicode/bidi for mixed-direction text. The long-term aim on the paths it covers is functional parity with the HarfBuzz + FreeType pair.

Repositories

Repo What it is
opentype the engine — sfnt parsing (all cmap formats, glyf + CFF/CFF2 outlines), GSUB/GPOS/GDEF shaping, variable fonts, TrueType + CFF hinting, the OpenType MATH table, subsetting, and anti-aliased 4×4-supersampled rasterisation
bidi the Unicode Bidirectional Algorithm (UAX #9), stdlib-only, no x/text
shape a HarfBuzz-lite complex-text shaper: Arabic joining, Indic, the Universal Shaping Engine, Egyptian hieroglyphs, Hangul, vertical text, ligatures/marks/kerning — positioned glyphs in visual order
fonts 46 bundled, legible, go:embedded font families — Latin, non-Latin scripts and CJK (Atkinson Hyperlegible default)
docs this documentation site (MkDocs Material, versioned with mike)
brand logo and brand assets

Principles

  • Pure Go, zero cgo, zero third-party dependencies. Cross-compiles and embeds anywhere Go runs, including GOOS=js GOARCH=wasm — no C toolchain, no vendored assets, no runtime fetch.
  • Honest about scope. Each repo's support matrix says plainly what's implemented. CFF/CFF2 outlines, every GSUB/GPOS lookup type with GDEF and lookup flags, TrueType + CFF hinting, vertical metrics, OpenType Variations (variable fonts, incl. HVAR/VVAR/MVAR), the OpenType MATH table and font subsetting are all implemented today — on the paths it covers the engine aims at functional parity with HarfBuzz + FreeType.
  • Conformance-tested. bidi validates against the entire Unicode BidiCharacterTest.txt; opentype and shape synthesise fonts in memory so their test suites never depend on an external .ttf.
  • 100% test coverage is the target, enforced as a CI gate, green across 6 arches plus js/wasm, darwin/arm64 and windows/amd64.

Status

opentype parses and rasterises TrueType glyf and CFF/CFF2 outlines with every GSUB/GPOS lookup type, variable fonts, TrueType + CFF hinting, the OpenType MATH table and subsetting; bidi implements UAX #9 through rule L2 with full conformance-test coverage; shape composes both into Arabic, Indic, Universal Shaping Engine, Egyptian hieroglyph, Hangul, vertical and Latin/default complex-text shaping; fonts bundles 46 OFL/BSD-licensed families across Latin, non-Latin scripts and CJK. 100% coverage, CI green across 6 arches plus js/wasm, darwin/arm64 and windows/amd64.

BSD-3-Clause.

Popular repositories Loading

  1. opentype opentype Public

    Pure-Go TrueType/OpenType font parsing + anti-aliased rasterisation (CGO=0, stdlib only)

    Go

  2. fonts fonts Public

    Ready-to-use legible fonts (Atkinson Hyperlegible, Inter, Go, Lora, JetBrains Mono) with easy Go access — pure-Go, for go-opentype

    Go

  3. shape shape Public

    HarfBuzz-lite complex-text shaper for the go-opentype stack: Arabic cursive joining, ligatures, mark attachment and kerning in visual order.

    Go

  4. brand brand Public

    Brand assets — logos & icons

  5. go-opentype.github.io go-opentype.github.io Public

    go-opentype landing page (Hugo)

    HTML

  6. docs docs Public

    go-opentype documentation (MkDocs Material + mike)

Repositories

Showing 7 of 7 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…