From: Debian Games Team Date: Sat, 11 May 2013 01:04:32 +0200 Subject: use_dejavu_fonts =================================================================== --- fonts.py | 8 ++++---- game.py | 4 ++-- leveledit.py | 9 +++------ pyglyph/html.py | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/fonts.py b/fonts.py index beeb28a..a1bb32e 100644 --- a/fonts.py +++ b/fonts.py @@ -1,13 +1,13 @@ import pyglyph # load up fonts -fonts = pyglyph.font.LocalFontFactory('data') -sans20 = fonts.get_font(family='bitstream vera sans', +fonts = pyglyph.font.LocalFontFactory('/usr/share/fonts/truetype/dejavu') +sans20 = fonts.get_font(family='DejaVu sans', size=20, bold=False, italic=False) -sans40 = fonts.get_font(family='bitstream vera sans', +sans40 = fonts.get_font(family='DejaVu sans', size=40, bold=False, italic=False) -mono20 = fonts.get_font(family='bitstream vera sans mono', +mono20 = fonts.get_font(family='DejaVu sans mono', size=20, bold=False, italic=False) diff --git a/game.py b/game.py index 04dc6e0..ab6dcac 100644 --- a/game.py +++ b/game.py @@ -44,7 +44,7 @@ class Game(ui.UserInterface): def menu(self): instructions = pyglyph.layout_html(''' - + (I)nstructions
(E)asy
(N)ormal
@@ -132,7 +132,7 @@ class Game(ui.UserInterface): def instructions(self): instructions = pyglyph.layout_html(''' - + Bouncy the Rabbit by Richard Jones
Written for the 3rd PyWeek Challenge: http://www.pyweek.org/ diff --git a/leveledit.py b/leveledit.py index 7dcca1a..49b4b21 100644 --- a/leveledit.py +++ b/leveledit.py @@ -1,4 +1,5 @@ import sys, pygame, csv, shutil, os +import fonts from pygame.locals import * from pygame.constants import * @@ -44,12 +45,8 @@ class LevelEditor: self.mode = 'props' # load up fonts - fonts = pyglyph.font.LocalFontFactory('data') - self.sans20 = fonts.get_font(family='bitstream vera sans', - size=20, bold=False, italic=False) - - self.sans40 = fonts.get_font(family='bitstream vera sans', - size=40, bold=False, italic=False) + self.sans20 = fonts.sans20 + self.sans40 = fonts.sans40 # button labels and callback funcs self.buttons = [ diff --git a/pyglyph/html.py b/pyglyph/html.py index 18714b1..a792e3b 100644 --- a/pyglyph/html.py +++ b/pyglyph/html.py @@ -131,7 +131,7 @@ class StylePrototype: self._attrs[Attribute.Bold] = False self._attrs[Attribute.Italic] = False self._attrs[Attribute.FontSize] = 12 - self._attrs[Attribute.FontName] = 'bitstream vera serif' + self._attrs[Attribute.FontName] = 'DejaVu serif' self._attrs[Attribute.Color] = (0, 0, 0, 1) def set_attribute(self, attribute, value):