package font import ( "image" "image/color" "image/draw" "unicode" "golang.org/x/text/runes" "golang.org/x/text/transform" "golang.org/x/text/unicode/norm" ) // Font is a bitmap font. type Font struct { GlyphWith int GlyphHeight int Spacing int glyphs map[rune][]uint16 glyphsV bool } func (f *Font) render(out draw.Image, c color.Color, x, y int, pixels []uint16) int { if f.glyphsV { for i, bits := range pixels { for j := 0; j < f.GlyphWith; j++ { if bits&(1<