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
|
|
|
}
|