Package: bouncy / 0.6.20071104-4

use_dejavu_fonts.patch Patch series | download
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
From: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
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/ttf-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('''
-            <font face="bitstream vera sans" size="40">
+            <font face="DejaVu sans" size="40">
                 (I)nstructions <br>
                 (E)asy <br>
                 (N)ormal <br>
@@ -132,7 +132,7 @@ class Game(ui.UserInterface):
 
     def instructions(self):
         instructions = pyglyph.layout_html('''
-            <font face="bitstream vera sans" size="20">
+            <font face="DejaVu sans" size="20">
 <b>Bouncy the Rabbit by Richard Jones</b>
 <br>
 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):