Skip to content

DejaVu fonts for Go

License

BSD-3-Clause, Unknown licenses found

Licenses found

BSD-3-Clause
LICENSE
Unknown
LICENSE-DejaVu
Notifications You must be signed in to change notification settings

go-fonts/dejavu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dejavu

GitHub release GoDoc License

dejavu provides the DejaVu fonts as importable Go packages.

The fonts are released under the DejaVu font license. The Go packages under the BSD-3 license.

Example

import (
	"fmt"
	"log"

	"github.com/go-fonts/dejavu/dejavumathtexgyre"
	"golang.org/x/image/font/sfnt"
)

func Example() {
	ttf, err := sfnt.Parse(dejavumathtexgyre.TTF)
	if err != nil {
		log.Fatalf("could not parse DejaVu Math font: %+v", err)
	}
	fmt.Printf("num glyphs: %d\n", ttf.NumGlyphs())

	// Output:
	// num glyphs: 4282
}