go-fonts/dejavu

GitHub: go-fonts/dejavu

将 DejaVu 字体打包为可导入的 Go 包,使 Go 应用无需外部文件即可内嵌使用这些字体。

Stars: 12 | Forks: 0

# dejavu [![GitHub 发布](https://img.shields.io/github/release/go-fonts/dejavu.svg)](https://github.com/go-fonts/dejavu/releases) [![GoDoc](https://godoc.org/github.com/go-fonts/dejavu?status.svg)](https://godoc.org/github.com/go-fonts/dejavu) [![许可证](https://img.shields.io/badge/License-BSD--3-blue.svg)](https://github.com/go-fonts/dejavu/raw/main/LICENSE) `dejavu` 将 [DejaVu](https://dejavu-fonts.github.io/) 字体作为可导入的 Go 包提供。 这些字体根据 [DejaVu 字体](https://github.com/go-fonts/dejavu/raw/main/LICENSE-DejaVu) 许可证发布。 Go 包则基于 [BSD-3](https://github.com/go-fonts/dejavu/raw/main/LICENSE) 许可证。 ## 示例 ``` 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分析, Go, Ruby工具, 图像处理, 字体, 开源字体, 日志审计, 资源包