Change panics to returning err in font.go