Description
Simple monospaced pixel font package for golang
fopix alternatives and similar packages
Based on the "Images" category.
Alternatively, view fopix alternatives based on common mentions on social networks and blogs.
-
Primitive Pictures
Reproducing images with geometric primitives. -
imaginary
Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing -
pigo
Fast face detection, pupil/eyes localization and facial landmark points detection library in pure Go. -
bimg
Go package for fast high-level image processing powered by libvips C library -
gowitness
🔍 gowitness - a golang, web screenshot utility using Chrome Headless -
stegify
🔍 Go tool for LSB steganography, capable of hiding any file within an image. -
geopattern
:triangular_ruler: Create beautiful generative image patterns from a string in golang. -
canvas
Cairo in Go: vector to raster, SVG, PDF, EPS, WASM, OpenGL, Gio, etc. -
Angular 2 Image Gallery
Image Gallery built with Angular 15+, node.js and GraphicsMagick -
darkroom
An image proxy with changeable storage backends and image processing engines with focus on speed and resiliency. -
mergi
go library for image programming (merge, crop, resize, watermark, animate, ease, transit) -
steganography
Pure Golang Library that allows LSB steganography on images using ZERO dependencies -
fastimage
Finds the type and/or size of a remote image given its uri, by fetching as little as needed. -
webp-server
Simple and minimal image server capable of storing, resizing, converting and caching images. -
LookUp
:mag: Pure Go implementation of fast image search and simple OCR, focused on reading info from screenshots -
goimghdr
The imghdr module determines the type of image contained in a file for go -
scout
Scout is a standalone open source software solution for DIY video security.
Access the most powerful time series database as a service
Do you think we are missing an alternative of fopix or a related project?
Popular Comparisons
README
fopix
Simple monospaced pixel font package for golang
Partly idea taken from: pixfont
Installation
go get github.com/toelsiba/fopix
Fonts
Font files are available in the directory [fonts](fonts). Fonts is saved in JSON format.
Digits 3x3
[digits-3x3](images/digits-3x3.png)
Digits 3x4
[digits-3x4](images/digits-3x4.png)
Digits 3x5
[digits-3x5](images/digits-3x5.png)
3x3 Font for Nerds
[font-3x3-ascii](images/font-3x3-ascii.png)
[font-3x3-multiline](images/font-3x3-multiline.png)
Victor
[victor-ascii](images/victor-ascii.png)
[victor-multiline](images/victor-multiline.png)
Miniwi
[miniwi-ascii](images/miniwi-ascii.png)
[miniwi-multiline](images/miniwi-multiline.png)
Tom Thumb
[tom-thumb-ascii](images/tom-thumb-ascii.png)
[tom-thumb-multiline](images/tom-thumb-multiline.png)
Tom Thumb New
[tom-thumb-new-ascii](images/tom-thumb-new-ascii.png)
[tom-thumb-new-multiline](images/tom-thumb-new-multiline.png)
Pixefon
[pixefon-ascii](images/pixefon-4x5-ascii.png)
[pixefon-multiline](images/pixefon-4x5-multiline.png)
VGA CP437
[cp437-table](images/cp437-table.png)
[cp437-text](images/cp437-text.png)
Examples
using existing font
package main
import (
"image"
"log"
"github.com/toelsiba/fopix"
"github.com/toelsiba/fopix/imutil"
)
func main() {
f, err := fopix.NewFromFile("../../fonts/tom-thumb-new.json")
if err != nil {
log.Fatal(err)
}
f.Scale(5)
const text = "Hello, World!"
m := image.NewRGBA(f.GetTextBounds(text))
f.DrawText(m, image.ZP, text)
if err = imutil.ImageSaveToPNG("hello-world.png", m); err != nil {
log.Fatal(err)
}
}
Result image
[hello-world](images/hello-world.png)
using custom font
package main
import (
"image"
"image/color"
"log"
"github.com/toelsiba/fopix"
"github.com/toelsiba/fopix/imutil"
)
// custom font
var gopherFont = fopix.FontInfo{
Name: "Go font",
Author: "Gopher",
Description: "something ...",
Size: fopix.Size{Dx: 6, Dy: 7},
AnchorPos: image.Point{0, 0},
TargetChar: '0',
CharSet: []fopix.RuneInfo{
fopix.RuneInfo{
Character: 'G',
Bitmap: []string{
"-000-",
"0---0",
"0----",
"0-000",
"0---0",
"-000-",
},
},
fopix.RuneInfo{
Character: 'o',
Bitmap: []string{
"-----",
"-----",
"-000-",
"0---0",
"0---0",
"-000-",
},
},
},
}
func main() {
f, err := fopix.New(gopherFont)
if err != nil {
log.Fatal(err)
}
f.Scale(10)
f.Color(color.RGBA{0, 0, 0xFF, 0xFF})
text := "Go"
m := image.NewRGBA(f.GetTextBounds(text))
imutil.ImageSolidFill(m, color.White)
f.DrawText(m, image.ZP, text)
if err = imutil.ImageSaveToPNG("go-font.png", m); err != nil {
log.Fatal(err)
}
}
Result image
[go-font](images/go-font.png)