Skip to content

Xolonium fonts for Go

License

BSD-3-Clause, OFL-1.1 licenses found

Licenses found

BSD-3-Clause
LICENSE
OFL-1.1
LICENSE-SIL
Notifications You must be signed in to change notification settings

go-fonts/xolonium

xolonium

GitHub release GoDoc License

xolonium provides the xolonium fonts as importable Go packages.

The fonts are released under the SIL Open Font license. The Go packages under the BSD-3 license.

Example

import (
	"fmt"
	"log"

	"github.com/go-fonts/xolonium/xoloniumregular"
	"golang.org/x/image/font/sfnt"
)

func Example() {
	ttf, err := sfnt.Parse(xoloniumregular.TTF)
	if err != nil {
		log.Fatalf("could not parse xolonium font: %+v", err)
	}

	var buf sfnt.Buffer
	v, err := ttf.Name(&buf, sfnt.NameIDVersion)
	if err != nil {
		log.Fatalf("could not retrieve font version: %+v", err)
	}

	fmt.Printf("version:    %q\n", v)
	fmt.Printf("num glyphs: %d\n", ttf.NumGlyphs())

	// Output:
	// version:    "Version 4.1 "
	// num glyphs: 836
}

About

Xolonium fonts for Go

Resources

License

BSD-3-Clause, OFL-1.1 licenses found

Licenses found

BSD-3-Clause
LICENSE
OFL-1.1
LICENSE-SIL

Stars

Watchers

Forks

Packages

No packages published

Languages