#NEWLINE# def __init__( self , font , verbose = False , print_status = False , test_mode = False , chunk_ratio = None , nrounds = None , single_process = None , processes = None , nsubrs_limit = None ) : #NEWLINE# #INDENT# '\n        Initialize the compressor.\n\n        Arguments:\n        font -- the TTFont to compress, must be a CFF font\n        verbose -- if True, print miscellanous info during iterations\n        print_status -- if True, print a few status updates\n        test_mode -- disables some checks (such as positive subr_saving)\n        chunk_ratio -- sets the POOL_CHUNKRATIO parameter\n        nrounds -- specifies the number of rounds to run\n        single_process -- indicates not to parallelize\n        processes -- specify the number of parallel processes\n        nsubrs_limit -- specify the limit on the number of subrs in an INDEX\n        ' #NEWLINE# if isinstance ( font , TTFont ) : #NEWLINE# #INDENT# assert ( 'CFF ' in font ) #NEWLINE# assert ( len ( font [ 'CFF ' ] . cff . topDictIndex ) == 1 ) #NEWLINE# self . font = font #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( 'Warning: non-TTFont given to Compreffor' ) #NEWLINE# #UNINDENT# self . verbose = verbose #NEWLINE# self . print_status = print_status #NEWLINE# self . test_mode = test_mode #NEWLINE# if ( chunk_ratio != None ) : #NEWLINE# #INDENT# self . POOL_CHUNKRATIO = chunk_ratio #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( font and ( len ( font [ 'CFF ' ] . cff . topDictIndex [ 0 ] . charset ) < self . CHUNK_CHARSET_CUTOFF ) ) : #NEWLINE# #INDENT# self . POOL_CHUNKRATIO = self . LATIN_POOL_CHUNKRATIO #NEWLINE# #UNINDENT# #UNINDENT# if ( nrounds != None ) : #NEWLINE# #INDENT# self . NROUNDS = nrounds #NEWLINE# #UNINDENT# if ( single_process != None ) : #NEWLINE# #INDENT# self . SINGLE_PROCESS = single_process #NEWLINE# #UNINDENT# if ( processes != None ) : #NEWLINE# #INDENT# self . PROCESSES = processes #NEWLINE# #UNINDENT# if ( nsubrs_limit != None ) : #NEWLINE# #INDENT# self . NSUBRS_LIMIT = nsubrs_limit