all repos — captcha @ 778d34d6f1546f5f9c281a8d30ebaceecee0fd99

Go package captcha implements generation and verification of image and audio CAPTCHAs.

font.go (view raw)

  1package captcha
  2
  3const (
  4	fontWidth  = 5
  5	fontHeight = 8
  6	blackChar  = 1
  7)
  8
  9var font = [][]byte{
 10	{ // 0
 11		0, 1, 1, 1, 0,
 12		1, 0, 0, 0, 1,
 13		1, 0, 0, 0, 1,
 14		1, 0, 0, 0, 1,
 15		1, 0, 0, 0, 1,
 16		1, 0, 0, 0, 1,
 17		1, 0, 0, 0, 1,
 18		0, 1, 1, 1, 0,
 19	},
 20	{ // 1
 21		0, 0, 1, 0, 0,
 22		0, 1, 1, 0, 0,
 23		1, 0, 1, 0, 0,
 24		0, 0, 1, 0, 0,
 25		0, 0, 1, 0, 0,
 26		0, 0, 1, 0, 0,
 27		0, 0, 1, 0, 0,
 28		1, 1, 1, 1, 1,
 29	},
 30	{ // 2
 31		0, 1, 1, 1, 0,
 32		1, 0, 0, 0, 1,
 33		0, 0, 0, 0, 1,
 34		0, 0, 0, 1, 1,
 35		0, 1, 1, 0, 0,
 36		1, 0, 0, 0, 0,
 37		1, 0, 0, 0, 0,
 38		1, 1, 1, 1, 1,
 39	},
 40	{ // 3
 41		1, 1, 1, 1, 0,
 42		0, 0, 0, 0, 1,
 43		0, 0, 0, 1, 0,
 44		0, 1, 1, 1, 0,
 45		0, 0, 0, 1, 0,
 46		0, 0, 0, 0, 1,
 47		0, 0, 0, 0, 1,
 48		1, 1, 1, 1, 0,
 49	},
 50	{ // 4
 51		1, 0, 0, 1, 0,
 52		1, 0, 0, 1, 0,
 53		1, 0, 0, 1, 0,
 54		1, 0, 0, 1, 0,
 55		1, 1, 1, 1, 1,
 56		0, 0, 0, 1, 0,
 57		0, 0, 0, 1, 0,
 58		0, 0, 0, 1, 0,
 59	},
 60	{ // 5
 61		1, 1, 1, 1, 1,
 62		1, 0, 0, 0, 0,
 63		1, 0, 0, 0, 0,
 64		1, 1, 1, 1, 0,
 65		0, 0, 0, 0, 1,
 66		0, 0, 0, 0, 1,
 67		0, 0, 0, 0, 1,
 68		1, 1, 1, 1, 0,
 69	},
 70	{ // 6
 71		0, 0, 1, 1, 1,
 72		0, 1, 0, 0, 0,
 73		1, 0, 0, 0, 0,
 74		1, 1, 1, 1, 0,
 75		1, 0, 0, 0, 1,
 76		1, 0, 0, 0, 1,
 77		1, 0, 0, 0, 1,
 78		0, 1, 1, 1, 0,
 79	},
 80	{ // 7
 81		1, 1, 1, 1, 1,
 82		0, 0, 0, 0, 1,
 83		0, 0, 0, 0, 1,
 84		0, 0, 0, 1, 0,
 85		0, 0, 1, 0, 0,
 86		0, 1, 0, 0, 0,
 87		0, 1, 0, 0, 0,
 88		0, 1, 0, 0, 0,
 89	},
 90	{ // 8
 91		0, 1, 1, 1, 0,
 92		1, 0, 0, 0, 1,
 93		1, 0, 0, 0, 1,
 94		0, 1, 1, 1, 0,
 95		1, 0, 0, 0, 1,
 96		1, 0, 0, 0, 1,
 97		1, 0, 0, 0, 1,
 98		0, 1, 1, 1, 0,
 99	},
100	{ // 9
101		0, 1, 1, 1, 0,
102		1, 0, 0, 0, 1,
103		1, 0, 0, 0, 1,
104		1, 1, 0, 0, 1,
105		0, 1, 1, 1, 1,
106		0, 0, 0, 0, 1,
107		0, 0, 0, 0, 1,
108		1, 1, 1, 1, 0,
109	},
110}