1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
Author: Olivier Sallou <olivier.sallou@irisa.fr>
Description: search fonts in Debian font dir
Last-Update: 2011-08-09
--- a/Captcha/Visual/Tests.py
+++ b/Captcha/Visual/Tests.py
@@ -44,7 +44,7 @@
class AntiSpam(ImageCaptcha):
"""A fixed-solution CAPTCHA that can be used to hide email addresses or URLs from bots"""
- fontFactory = Text.FontFactory(20, "vera/VeraBd.ttf")
+ fontFactory = Text.FontFactory(20, "ttf-bitstream-vera/VeraBd.ttf")
defaultSize = (512,50)
def getLayers(self, solution="murray@example.com"):
--- a/Captcha/Visual/Text.py
+++ b/Captcha/Visual/Text.py
@@ -19,7 +19,7 @@
in that directory will be added.
"""
extensions = [".ttf"]
- basePath = "fonts"
+ basePath = "/usr/share/fonts/truetype/"
def __init__(self, sizes, *fileNames):
File.RandomFileFactory.__init__(self, *fileNames)
@@ -38,7 +38,7 @@
return (fileName, size)
# Predefined font factories
-defaultFontFactory = FontFactory((30, 40), "vera")
+defaultFontFactory = FontFactory((30, 40), "ttf-bitstream-vera")
class TextLayer(Visual.Layer):
|