erm/app/darktile/cmd/fonts.go

22 lines
304 B
Go

package cmd
import (
"fmt"
"github.com/liamg/fontinfo"
)
type ListFonts struct {
}
func (r *ListFonts) Run(ctx *Context) error {
fonts, err := fontinfo.Match(fontinfo.MatchStyle("Regular"))
if err != nil {
return err
}
for _, font := range fonts {
fmt.Println(font.Family)
}
return nil
}