bitfont

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 2 Imported by: 0

README

a helper for golang.org/x/image/font/basicfont

check examples/ to get more information

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitFont

type BitFont struct {
	Width, Height            int
	Advance, Ascent, Descent int
	Left                     int
	// contains filtered or unexported fields
}

func New

func New(opts ...BitFontOpt) *BitFont

func (*BitFont) Face

func (u *BitFont) Face() *basicfont.Face

func (*BitFont) Mask

func (u *BitFont) Mask() (mask *image.Alpha)

type BitFontOpt

type BitFontOpt func(u *BitFont)

type BitFontOptions

type BitFontOptions struct{}
var Options BitFontOptions

func (BitFontOptions) AddRune

func (BitFontOptions) AddRune(offset int, r rune) BitFontOpt

func (BitFontOptions) AddString

func (BitFontOptions) AddString(offset int, s string) BitFontOpt

func (BitFontOptions) Advance

func (BitFontOptions) Advance(d int) BitFontOpt

func (BitFontOptions) Ascent

func (BitFontOptions) Ascent(d int) BitFontOpt

func (BitFontOptions) Bytes

func (BitFontOptions) Bytes(data []byte) BitFontOpt

func (BitFontOptions) Descent

func (BitFontOptions) Descent(d int) BitFontOpt

func (BitFontOptions) Face

func (BitFontOptions) Face(advance, ascent, descent int) BitFontOpt

func (BitFontOptions) Height

func (BitFontOptions) Height(d int) BitFontOpt

func (BitFontOptions) Image

func (BitFontOptions) Image(img image.Image) BitFontOpt

func (BitFontOptions) Left

func (BitFontOptions) Left(d int) BitFontOpt

func (BitFontOptions) Range

func (BitFontOptions) Range(offset int, low rune, high ...rune) BitFontOpt

func (BitFontOptions) Size

func (BitFontOptions) Size(w, h int) BitFontOpt

func (BitFontOptions) Width

func (BitFontOptions) Width(d int) BitFontOpt

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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