Esempio n. 1
0
    def run_processes(self, filename, pipedata):
        from bakery_cli.pipe.fontlint import FontLint
        from bakery_cli.pipe.pyftsubset import PyFtSubset
        from bakery_cli.pipe.optimize import Optimize
        from bakery_cli.pipe.ttfautohint import TTFAutoHint
        from bakery_cli.pipe.font_crunch import FontCrunch

        from bakery_cli.utils import ProcessedFile
        processedfile = ProcessedFile()
        processedfile.filepath = filename

        fontlint = FontLint(self.bakery)
        fontlint.run(pipedata)

        optimize = Optimize(self.bakery)
        optimize.run(pipedata)

        ttfautohint = TTFAutoHint(self.bakery)
        ttfautohint.run(pipedata)

        pyftsubset = PyFtSubset(self.bakery)
        pyftsubset.run(pipedata)

        fontcrunch = FontCrunch(self.bakery)
        fontcrunch.run(pipedata)
Esempio n. 2
0
    def run_processes(self, filename, pipedata):
        from bakery_cli.pipe.fontlint import FontLint
        from bakery_cli.pipe.pyftsubset import PyFtSubset
        from bakery_cli.pipe.optimize import Optimize
        from bakery_cli.pipe.ttfautohint import TTFAutoHint
        from bakery_cli.pipe.font_crunch import FontCrunch

        from bakery_cli.utils import ProcessedFile
        processedfile = ProcessedFile()
        processedfile.filepath = filename

        fontlint = FontLint(self.bakery)
        fontlint.run(pipedata)

        optimize = Optimize(self.bakery)
        optimize.run(pipedata)

        ttfautohint = TTFAutoHint(self.bakery)
        ttfautohint.run(pipedata)

        pyftsubset = PyFtSubset(self.bakery)
        pyftsubset.run(pipedata)

        fontcrunch = FontCrunch(self.bakery)
        fontcrunch.run(pipedata)
Esempio n. 3
0
    def fix(self):
        newfilename = self.validate()

        new_targetpath = os.path.join(os.path.dirname(self.fontpath),
                                      newfilename)
        shutil.move(self.fontpath, new_targetpath)

        from bakery_cli.logger import logger
        logger.info('$ mv {} {}'.format(self.fontpath, os.path.basename(new_targetpath)))

        self.testcase.operator.path = new_targetpath
        from bakery_cli.utils import ProcessedFile
        
        f = ProcessedFile()
        f.filepath = newfilename

        self.save_after_fix = False
        return True
Esempio n. 4
0
    def fix(self):
        newfilename = self.validate()

        new_targetpath = os.path.join(os.path.dirname(self.fontpath),
                                      newfilename)
        shutil.move(self.fontpath, new_targetpath)

        from bakery_cli.logger import logger
        logger.info('$ mv {} {}'.format(self.fontpath,
                                        os.path.basename(new_targetpath)))

        self.testcase.operator.path = new_targetpath
        from bakery_cli.utils import ProcessedFile

        f = ProcessedFile()
        f.filepath = newfilename

        self.save_after_fix = False
        return True