go-fonts/latin-modern
GitHub: go-fonts/latin-modern
将 Latin Modern 字体封装为可直接导入的 Go 包,方便开发者在 Go 项目中使用该字体进行文本和数学公式渲染。
Stars: 10 | Forks: 1
# latin-modern
[](https://github.com/go-fonts/latin-modern/releases)
[](https://godoc.org/github.com/go-fonts/latin-modern)
[](https://github.com/go-fonts/latin-modern/raw/master/LICENSE)
`latin-modern` 将 [Latin Modern](http://www.gust.org.pl/projects/e-foundry/latin-modern) 字体提供为可导入的 Go 包。
这些字体在 [GUST font](https://github.com/go-fonts/latin-modern/raw/master/LICENSE-GUST) 许可下发布。
Go 包采用 [BSD-3](https://github.com/go-fonts/latin-modern/raw/master/LICENSE) 许可。
## 示例
```
import (
"fmt"
"log"
"github.com/go-fonts/latin-modern/lmmath"
"golang.org/x/image/font/sfnt"
)
func Example() {
ttf, err := sfnt.Parse(lmmath.TTF)
if err != nil {
log.Fatalf("could not parse Latin Modern Math font: %+v", err)
}
fmt.Printf("num glyphs: %d\n", ttf.NumGlyphs())
// Output:
// num glyphs: 4802
}
```
标签:EVTX分析, Go, Latin Modern, Ruby工具, 多媒体资源, 字体, 开发库, 日志审计