fish-red / gofontviewer

Render TTF fonts to an HTML5 Canvas in Go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fontviewer

This is just some garbage code I wrote to see how hard it would be to render TTF fonts to an HTML5 Canvas in Go.

Sample

Libraries

Building

$ go get github.com/zach-klippenstein/gofontviewer
$ ./build.sh
$ open fontviewer.html # or whatever command you use to open a browser

Adding Fonts

Comes with Google's Roboto.

To add a font, drop a TTF file in fonts/ and add a //go:generate … line to fonts/fonts.go.

About

Render TTF fonts to an HTML5 Canvas in Go.


Languages

Language:Go 90.5%Language:Shell 8.4%Language:HTML 1.1%