예제 #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)
예제 #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)
예제 #3
0
 def run_lib(self):
     assert os.path.exists(self.lib_path)
     cxxCompressor.compreff(self.font, use_lib=True, **self.options)
예제 #4
0
 def run_executable(self):
     assert os.path.exists(self.exe_path)
     cxxCompressor.compreff(self.font, use_lib=False, **self.options)
예제 #5
0
 def run_cxx(self):
     cxxCompressor.compreff(self.font, **self.options)
예제 #6
0
 def run_cxx(self):
     cxxCompressor.compreff(self.font, **self.options)
예제 #7
0
 def run_lib(self):
     assert os.path.exists(self.lib_path)
     cxxCompressor.compreff(self.font, use_lib=True, **self.options)
예제 #8
0
 def run_executable(self):
     assert os.path.exists(self.exe_path)
     cxxCompressor.compreff(self.font, use_lib=False, **self.options)