X-Git-Url: https://svn.cri.ensmp.fr/git/minwii.git/blobdiff_plain/46f3ffd7fdde386f41020171b5733e55a8e64a85..1d694f30320dafc38bad2055de5619b1051a4fd2:/src/minwii/config.py diff --git a/src/minwii/config.py b/src/minwii/config.py index f98238b..8d27e28 100755 --- a/src/minwii/config.py +++ b/src/minwii/config.py @@ -10,6 +10,9 @@ import pygame import os.path _here = os.path.abspath(__file__).split(os.path.sep)[:-1] +if _here[-2].endswith('.exe') or _here[-2].endswith('*.zip') : + _here.pop(-2) + def _computePath(path) : path = path.split('/') path = _here + path @@ -32,7 +35,8 @@ ON_COLUMN_OVERSIZING = 2 ON_COLUMN_ALPHA = 1 font_file = _computePath('fonts/Arial Unicode.ttf') NOTES_FONT = pygame.font.Font(font_file, 50) -LYRICS_FONT = pygame.font.Font(None, 80) +default_font_file = _computePath('fonts/freesansbold.ttf') +LYRICS_FONT = pygame.font.Font(default_font_file, 80) FONT_COLOR = (0,0,0) MIDI_VELOCITY_RANGE = (64, 127) MIDI_PAN_RANGE = (32, 96) @@ -84,4 +88,4 @@ INSTRUMENTS = ( ) for i in INSTRUMENTS : - i['octave'] = i.get('octave', 0) \ No newline at end of file + i['octave'] = i.get('octave', 0)