bdf-explorer

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 6 Imported by: 0

README

bdf-explorer

Quick BDF font utility, because I needed one. Forked from zachomedia/go-bdf - thanks!

commandline usage

bdf-explorer -font "<path>" 

Generates a png with a grid of all characters.

bdf-explorer -font "<path>"  -export

Generates a png with a grid of all and exports each character as a separate png file into a subdirectory.

library usage

go get github.com/ByteSizedMarius/bdf-explorer
package main

import "github.com/ByteSizedMarius/bdf-explorer/bdf"

func main() {
	// load a file
	font, err := bdf.FromFile("<path>")

	// etc.
}
type Face struct {
    Font *Font
}

type Font struct {
	Name        string
	Size        int
	PixelSize   int
	DPI         [2]int
	BPP         int
	Ascent      int
	Descent     int
	CapHeight   int
	XHeight     int
	Characters  []Character
	CharMap     map[rune]*Character
	Encoding    string
	DefaultChar rune
}

type Character struct {
    Name       string
    Encoding   rune
    Advance    [2]int
    Alpha      *image.Alpha
    LowerPoint [2]int
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL