https://github.com/k1low/glyph
Icon as Code
https://github.com/k1low/glyph
as-code icon
Last synced: 8 months ago
JSON representation
Icon as Code
- Host: GitHub
- URL: https://github.com/k1low/glyph
- Owner: k1LoW
- License: mit
- Created: 2020-11-19T16:19:12.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-06-26T22:36:22.000Z (over 1 year ago)
- Last Synced: 2025-04-17T07:14:51.780Z (10 months ago)
- Topics: as-code, icon
- Language: Go
- Homepage:
- Size: 467 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# glyph [](https://github.com/k1LoW/glyph/actions)
`glyph` is a embedded icon framework.
## Concept
`glyph` generates icons by connecting predefined coordinates with lines.

``` go
package main
import (
"os"
"strings"
"github.com/k1LoW/glyph"
)
func main() {
g, _ := glyph.New()
_ = g.Line(strings.Split("b0 d0 h0 j0 j6 h8 d8 b6 b0", " "))
_ = g.Line(strings.Split("b0 d2 h2 j0", " "))
_ = g.Line(strings.Split("b2 d4 h4 j2", " "))
_ = g.Line(strings.Split("b4 d6 h6 j4", " "))
_ = g.Write(os.Stdout)
}
```
## Included Icon Set
`glyph` has [included icon set](included.md).
``` go
package main
import (
"os"
"strings"
"github.com/k1LoW/glyph"
)
func main() {
g, _ := glyph.Included().Get("browser")
_ = g.Write(os.Stdout)
}
```