https://github.com/tinne26/ggfnt-fonts
Fonts for the ggfnt pixel art font format.
https://github.com/tinne26/ggfnt-fonts
font pixel-art pixel-font
Last synced: about 2 months ago
JSON representation
Fonts for the ggfnt pixel art font format.
- Host: GitHub
- URL: https://github.com/tinne26/ggfnt-fonts
- Owner: tinne26
- Created: 2024-07-01T09:46:58.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-10-03T20:29:16.000Z (7 months ago)
- Last Synced: 2024-12-24T07:45:00.367Z (4 months ago)
- Topics: font, pixel-art, pixel-font
- Language: Go
- Homepage:
- Size: 203 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ggfnt-fonts
This project exposes free [ggfnt](https://github.com/tinne26/ggfnt) fonts for use with Golang programs, most commonly [Ebitengine](https://github.com/hajimehoshi/ebiten) games that use the [ptxt](https://github.com/tinne26/ptxt) font rendering library.
## Font samples
`github.com/tinne26/ggfnt-fonts/tinny`
`github.com/tinne26/ggfnt-fonts/tinnybold`
`github.com/tinne26/ggfnt-fonts/graybit`
`github.com/tinne26/ggfnt-fonts/omen`
`github.com/tinne26/ggfnt-fonts/candy`
`github.com/tinne26/ggfnt-fonts/strut`
`github.com/tinne26/ggfnt-fonts/starship`
`github.com/tinne26/ggfnt-fonts/flick`
`github.com/tinne26/ggfnt-fonts/minitile`
## Licenses
Most fonts in this project are licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/), though some might be adaptations of well known fonts designed in other formats and with their own licenses. See each font subfolder for additional details.
The Golang code used to provide access to the fonts is extremely trivial and MIT licensed. The code for building fonts is not licensed, as it contains representations of the font glyphs themselves (but feel free to use the structure and basic methods as reference).
## Usage
All subpackages expose at least two methods:
- `Font()`, which parses the font if it wasn't parsed yet, caches it and returns it as a `*ggfnt.Font`.
- `Release()`, which frees the cached font if it was loaded at any point by `Font()`.Some subpackages contain additional constants for font settings, specific glyphs and code point mappings. The most common is probably `NotdefRune` (`rune`) and `Notdef` (`ggfnt.GlyphIndex`). Glyph pickers might also be provided for some fancy fonts in order to make life easier when working with ptxt.
Example program:
```Golang
package mainimport "fmt"
import "github.com/tinne26/ggfnt-fonts/graybit"func main() {
font := graybit.Font()
verMajor, verMinor := font.Header().VersionMajor(), font.Header().VersionMinor()
fmt.Printf("Font: %s (v%d.%02d)\n", font.Header().Name(), verMajor, verMinor)
fmt.Printf("Num. glyphs: %d\n", font.Glyphs().Count())
fmt.Printf("Author: %s\n", font.Header().Author())
fmt.Printf("About:\n> %s\n", font.Header().About())
}
```
The names of the subpackages and their paths match what you can find in this repository.## Pangrams
I actually made some of the pangrams for the examples on my own, here they are:
- Twin axes ablaze, the grumpy viking reconquered the fjord.
- The zombie geeks acquired explosive jellyfish now!?
- Saxophonists frequently acknowledge my jazzy vibes.
- Catalyzer hijack verified, equip low oxygen bombs.
- Objectively speaking, frozen marshmallows are darn exquisite.
- Hendrix's jam —if unequivocably squawky— was hypnotizing.
- Josephine, buddy, the squeezy wolfkin are exclusively mine!They are a tad long, but at least some of them have nice and understandable stories. A few more variations:
- Wanted zombie geeks aquire explosive jellyfish. *(shorter but less funny imo)*
- Saxophonists disqualify overembellished spacewalking jazz. *(only five words, but convoluted)*
- Hendrix's jam was hypnotizing, unequivocably funky.Sadly, I don't know the authors of "amazingly few discotheques provide jukeboxes", "sphinx of black quartz, judge my vow" and other cool pangrams; I'd love to give them credit otherwise!