Created
December 29, 2021 17:09
-
-
Save nwillc/04656cacae7725f87a835d8d987bb04b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func readBitmaps(embedFs embed.FS, path string) Font { | |
files, err := embedFs.ReadDir(path) | |
if err != nil { | |
panic(err) | |
} | |
toFontRuneKV := func(f fs.DirEntry) (rune, FontRune) { | |
return toCharName(f.Name()), toFontRune(embedFs, path, f.Name()) | |
} | |
return genfuncs.Associate(files, toFontRuneKV) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment