func (f *Finder) List() []*Font {
	fonts := make([]*Font, 0, len(f.fonts))
	for _, font := range f.fonts {
		fonts = append(fonts, font.clone())
	}
	return fonts
}
List returns the list of installed fonts. The finder attempts to identify
the name and family of the returned fonts. If identification is not possible,
only the filename field will be filled.
package sysfont
import (
	"os"
	"path/filepath"
	"strings"
	"github.com/adrg/strutil"
	"github.com/adrg/xdg"
)
type Finder struct {
	fonts []*Font
}
type FinderOpts struct {
	Extensions []string
}
func NewFinder(opts *FinderOpts) *Finder {
	if opts == nil {
		opts = &FinderOpts{Extensions: []string{".ttf", ".ttc", ".otf"}}
	}
	var fonts []*Font
	walker := func(filename string, info os.FileInfo, err error) error {
		if err != nil {
			return err
		}
		if info.IsDir() {
			return nil
		}
		if extensions := opts.Extensions; len(extensions) > 0 {
			extension := filepath.Ext(strings.ToLower(filename))
			if !strutil.SliceContains(extensions, extension) {
				return nil
			}
		}
		matches := fontRegistry.matchFontsByFilename(filename)
		if len(matches) == 0 {
			matches = append(matches, &Font{Filename: filename})
		}
		fonts = append(fonts, matches...)
		return nil
	}
	for _, dir := range xdg.FontDirs {
		if err := filepath.Walk(dir, walker); err != nil {
			continue
		}
	}
	return &Finder{
		fonts: fonts,
	}
}