Skip to content

tinne26/ggfnt-fonts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ggfnt-fonts

This project exposes free ggfnt fonts for use with Golang programs, most commonly Ebitengine games that use the ptxt font rendering library.

Font samples

github.com/tinne26/ggfnt-fonts/tinny sample_tinny

github.com/tinne26/ggfnt-fonts/tinnybold sample_tinny_bold

github.com/tinne26/ggfnt-fonts/graybit sample_graybit

github.com/tinne26/ggfnt-fonts/omen sample_omen

github.com/tinne26/ggfnt-fonts/candy sample_candy

github.com/tinne26/ggfnt-fonts/strut sample_strut

github.com/tinne26/ggfnt-fonts/starship sample_starship

github.com/tinne26/ggfnt-fonts/flick sample_flick

github.com/tinne26/ggfnt-fonts/minitile sample_minitile

Licenses

Most fonts in this project are licensed under CC 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:

package main

import "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!

About

Fonts for the ggfnt pixel art font format.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages