erm/app/darktile/cmd/fonts.go

22 lines
304 B
Go
Raw Normal View History

2021-07-30 22:29:20 +00:00
package cmd
import (
"fmt"
"github.com/liamg/fontinfo"
)
2023-01-16 02:55:18 +00:00
type ListFonts struct {
2021-07-30 22:29:20 +00:00
}
2023-01-16 02:55:18 +00:00
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
2021-07-30 22:29:20 +00:00
}