go-fonts/dejavu
GitHub: go-fonts/dejavu
Stars: 12 | Forks: 0
# dejavu
[](https://github.com/go-fonts/dejavu/releases)
[](https://godoc.org/github.com/go-fonts/dejavu)
[](https://github.com/go-fonts/dejavu/raw/main/LICENSE)
`dejavu` provides the [DejaVu](https://dejavu-fonts.github.io/) fonts as importable Go packages.
The fonts are released under the [DejaVu font](https://github.com/go-fonts/dejavu/raw/main/LICENSE-DejaVu) license.
The Go packages under the [BSD-3](https://github.com/go-fonts/dejavu/raw/main/LICENSE) 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
}
标签:EVTX分析