From bac4e6ad74c4a1d5ce041c566c439973273ce572 Mon Sep 17 00:00:00 2001 From: pin Date: Wed, 26 May 2010 11:47:31 +0000 Subject: [PATCH] =?utf8?q?R=C3=A9solution=20du=20path=20absolu.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.cri.ensmp.fr/svn/minwii/trunk@189 fe552daf-6dbe-4428-90eb-1537e0879342 --- src/minwii/config.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/minwii/config.py b/src/minwii/config.py index f98238b..9313339 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 @@ -18,6 +21,8 @@ def _computePath(path) : pygame.font.init() +pygamedir = os.path.split(pygame.base.__file__)[0] +default_font_file = os.path.join(pygamedir, pygame.font.get_default_font()) # playingscreen @@ -32,7 +37,7 @@ 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) +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 +89,4 @@ INSTRUMENTS = ( ) for i in INSTRUMENTS : - i['octave'] = i.get('octave', 0) \ No newline at end of file + i['octave'] = i.get('octave', 0) -- 2.20.1