# HG changeset patch # User Neil Muller # Date 1315758399 -7200 # Node ID ac6688820528e1616edfe71fcaf5e640ea91c1e6 # Parent daa04393bfc602a3de5f7b5e136e6c26ba6fe507 Move font name to constants, for future configurablity diff -r daa04393bfc6 -r ac6688820528 mamba/constants.py --- a/mamba/constants.py Sun Sep 11 18:14:08 2011 +0200 +++ b/mamba/constants.py Sun Sep 11 18:26:39 2011 +0200 @@ -17,6 +17,9 @@ # Keyboard constants ESCAPE_KEYS = (K_ESCAPE, K_q) +# For easy access later +DEFAULT_FONT = 'DejaVuSans.ttf' + # Default command-line options DEFAULTS = { 'debug': False, diff -r daa04393bfc6 -r ac6688820528 mamba/widgets/text.py --- a/mamba/widgets/text.py Sun Sep 11 18:14:08 2011 +0200 +++ b/mamba/widgets/text.py Sun Sep 11 18:26:39 2011 +0200 @@ -2,6 +2,7 @@ from mamba.widgets.base import Widget from mamba.data import filepath +from mamba.constants import DEFAULT_FONT class TextWidget(Widget): fontcache = {} @@ -14,7 +15,7 @@ self.prepare() def prepare(self): - self.fontname = 'DejaVuSans.ttf' + self.fontname = DEFAULT_FONT font = (self.fontname, self.fontsize) if font not in TextWidget.fontcache: fontfn = filepath('fonts/' + self.fontname)