-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
fonts.py
43 lines (28 loc) · 1010 Bytes
/
fonts.py
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
#!/usr/bin/env python
#-*- coding: utf8 -*-
from locals import FONT_SERIF_PATH, FONT_EASTERN_PATH
import pygame
pygame.font.init()
_serif_western_normal = pygame.font.Font(FONT_SERIF_PATH, 24)
_serif_western_big = pygame.font.Font(FONT_SERIF_PATH, 30)
_serif_japanese_normal = pygame.font.Font(FONT_EASTERN_PATH, 24)
_serif_japanese_big = pygame.font.Font(FONT_EASTERN_PATH, 30)
_serif_path = FONT_SERIF_PATH
_serif_normal = _serif_western_normal
_serif_big = _serif_western_big
def get_serif_path():
return _serif_path
def get_serif_normal():
return _serif_normal
def get_serif_big():
return _serif_big
def switch_to_japanese():
global _serif_path, _serif_normal, _serif_big
_serif_path = FONT_EASTERN_PATH
_serif_normal = _serif_japanese_normal
_serif_big = _serif_japanese_big
def switch_to_western():
global _serif_path, _serif_normal, _serif_big
_serif_path = FONT_SERIF_PATH
_serif_normal = _serif_western_normal
_serif_big = _serif_western_big