Skip to content

stephenwithav/fontcache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fontcache

A simple font-caching utility enabled by golang/freetype#19.

A simple example:

import (
    "log"
    "github.com/stephenwithav/fontcache"
)

func main() {
    fontPath := "./fonts"

    fc := fontcache.New()
    fc.Init(fontPath)

    // Retrieve font by name for use in a program.
    font, err := fc.Get("Luxi Sans", "Regular")
    if err != nil {
	    log.Fatalf("%s", err)
    }

    DoStuff(font)
}

About

Font-caching utility for Golang.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages