Exemplo n.º 1
0
def compress(ttFont, method_python=False, **options):
    """ Subroutinize TTFont instance in-place using the C++ Compreffor.
    If 'method_python' is True, use the slower, pure-Python Compreffor.
    If the font already contains subroutines, it is first decompressed.
    """
    if has_subrs(ttFont):
        log.warning("There are subroutines in font; must decompress it first")
        decompress(ttFont)
    if method_python:
        pyCompressor.compreff(ttFont, **options)
    else:
        cxxCompressor.compreff(ttFont, **options)
Exemplo n.º 2
0
def compress(ttFont, method_python=False, **options):
    """ Subroutinize TTFont instance in-place using the C++ Compreffor.
    If 'method_python' is True, use the slower, pure-Python Compreffor.
    If the font already contains subroutines, it is first decompressed.
    """
    if has_subrs(ttFont):
        log.warning(
            "There are subroutines in font; must decompress it first")
        decompress(ttFont)
    if method_python:
        pyCompressor.compreff(ttFont, **options)
    else:
        cxxCompressor.compreff(ttFont, **options)
Exemplo n.º 3
0
 def run_lib(self):
     assert os.path.exists(self.lib_path)
     cxxCompressor.compreff(self.font, use_lib=True, **self.options)
Exemplo n.º 4
0
 def run_executable(self):
     assert os.path.exists(self.exe_path)
     cxxCompressor.compreff(self.font, use_lib=False, **self.options)
Exemplo n.º 5
0
 def run_cxx(self):
     cxxCompressor.compreff(self.font, **self.options)
Exemplo n.º 6
0
 def run_cxx(self):
     cxxCompressor.compreff(self.font, **self.options)
Exemplo n.º 7
0
 def run_lib(self):
     assert os.path.exists(self.lib_path)
     cxxCompressor.compreff(self.font, use_lib=True, **self.options)
Exemplo n.º 8
0
 def run_executable(self):
     assert os.path.exists(self.exe_path)
     cxxCompressor.compreff(self.font, use_lib=False, **self.options)