root/src/font.py @ 401

Revision 401, 0.7 KB (checked in by rthomas, 2 years ago)

added win scene and back/forward responses

Line 
1'''
2Created on March 10, 2012
3
4@author: TechTrek
5'''
6
7
8import os
9import pygame
10from fileio import resourceDir
11
12__all__ = ["XSM_TEXT", "SM_TEXT", "MD_TEXT",
13           "LG_TEXT", "XLG_TEXT", "HG_TEXT"]
14
15
16FONT_NAME = resourceDir + "BNEG98.ttf"
17MAX_FONT_SIZE = 100
18
19if not pygame.font.get_init():
20    pygame.font.init()
21
22# use default sizes
23if not os.path.isfile(FONT_NAME):
24    XSM_TEXT = 24
25    SM_TEXT = 29
26    MD_TEXT = 32
27    LG_TEXT = 42
28    XLG_TEXT = 48
29    HG_TEXT = 72
30# font found
31else:
32    XSM_TEXT = 16
33    SM_TEXT = 22
34    MD_TEXT = 25
35    LG_TEXT = 35
36    XLG_TEXT = 40
37    HG_TEXT = 45
38
39fontLUT = []
40for size in range(0, MAX_FONT_SIZE):
41    fontLUT.append(pygame.font.Font(FONT_NAME, size))
Note: See TracBrowser for help on using the browser.