blob: 83999efb44a6a47422ecb5dd543d9a74fc8705fd (
plain) (
tree)
|
|
import os
import pygame
import sys
def font(size, font = "Ubuntu-Regular"):
if getattr(sys, 'frozen', False):
return pygame.font.Font(sys._MEIPASS + "/fonts/" + font + ".ttf", size)
else:
path = os.path.dirname(os.path.realpath(__file__))
return pygame.font.Font(path + "/../fonts/" + font + ".ttf", size)
|