Exemple #1
0
    def __init__(self):
        # distribution over the type of text:
        load_cfg(self)

        self.curvature = Curvature()

        # text-source : gets english text:
        self.corpora = Corpora()

        # get font-state object:
        self.text_state = TextState()

        pygame.init()
Exemple #2
0
    def __init__(self):
        """
        TXT_FP : path to file containing text data.
        """
        load_cfg(self)
        #fp = osp.join(self.data_dir, 'newsgroup/newsgroup.txt')
        #fp = osp.join(self.data_dir, 'newsgroup/alpha_words.txt')
        self.fdict = {
            'WORD': self.sample_word,
            'LINE': self.sample_line,
            'PARA': self.sample_para
        }

        with open(self.corpora_fp, 'r') as f:
            self.txt = [l.strip() for l in f.readlines()]
Exemple #3
0
 def __init__(self):
     # # get a list of background-images:
     # imlist = [osp.join(im_path,f) for f in os.listdir(im_path)]
     # self.bg_list = [p for p in imlist if osp.isfile(p)]
     load_cfg(self)
     self.font_color = FontColor(self.font_fp)
Exemple #4
0
 def __init__(self):
     load_cfg(self)
Exemple #5
0
 def __init__(self):
     load_cfg(self)
     self.text_render = text_renderer.TextRenderer()
     self.colorizer = Colorizer()