mirror of
https://github.com/lepture/captcha.git
synced 2025-08-26 20:40:21 +08:00
Make image font sizes smaller
This commit is contained in:
@ -1,7 +1,6 @@
|
|||||||
language: python
|
language: python
|
||||||
|
|
||||||
python:
|
python:
|
||||||
- "2.6"
|
|
||||||
- "2.7"
|
- "2.7"
|
||||||
- "3.3"
|
- "3.3"
|
||||||
- "3.4"
|
- "3.4"
|
||||||
|
@ -33,7 +33,8 @@ else:
|
|||||||
table = []
|
table = []
|
||||||
for i in range( 256 ):
|
for i in range( 256 ):
|
||||||
table.append( i * 1.97 )
|
table.append( i * 1.97 )
|
||||||
|
|
||||||
|
|
||||||
class _Captcha(object):
|
class _Captcha(object):
|
||||||
def generate(self, chars, format='png'):
|
def generate(self, chars, format='png'):
|
||||||
"""Generate an Image Captcha of the given characters.
|
"""Generate an Image Captcha of the given characters.
|
||||||
@ -109,7 +110,7 @@ class ImageCaptcha(_Captcha):
|
|||||||
self._width = width
|
self._width = width
|
||||||
self._height = height
|
self._height = height
|
||||||
self._fonts = fonts or DEFAULT_FONTS
|
self._fonts = fonts or DEFAULT_FONTS
|
||||||
self._font_sizes = font_sizes or (46, 58, 68)
|
self._font_sizes = font_sizes or (42, 50, 56)
|
||||||
self._truefonts = []
|
self._truefonts = []
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Reference in New Issue
Block a user