def test_writeOptionsFile(): actual_path = get_temp_file_path() expected_path = get_expected_path('proj_write.txt') params = MakeOTFParams() params.currentDir = os.path.dirname(actual_path) params.opt_InputFontPath = 'font.pfa' params.opt_OutputFontPath = 'fôñt.otf' params.opt_kSetfsSelectionBitsOn = [7] params.opt_kSetfsSelectionBitsOff = [9, 8] params.opt_ConvertToCID = 'true' params.opt_kSetOS2Version = 3 params.verbose = True # set options's sort order kMOTFOptions['InputFontPath'][0] = 1 kMOTFOptions['OutputFontPath'][0] = kOptionNotSeen + 1 kMOTFOptions['kSetfsSelectionBitsOn'][0] = 30 writeOptionsFile(params, actual_path) assert differ([expected_path, actual_path])
def test_writeOptionsFile(): actual_path = get_temp_file_path() expected_path = get_expected_path('proj_write.txt') params = MakeOTFParams() params.currentDir = os.path.dirname(actual_path) params.opt_InputFontPath = 'font.pfa' params.opt_OutputFontPath = 'fôñt.otf' params.opt_kSetfsSelectionBitsOn = [7] params.opt_kSetfsSelectionBitsOff = [9, 8] params.opt_ConvertToCID = 'true' params.opt_kSetOS2Version = 3 params.verbose = True # set options's sort order kMOTFOptions['InputFontPath'][0] = 1 kMOTFOptions['OutputFontPath'][0] = kOptionNotSeen + 1 kMOTFOptions['kSetfsSelectionBitsOn'][0] = 30 writeOptionsFile(params, actual_path) assert differ([expected_path, actual_path])