import { BuildBaseFileInputOutputModel, FONT_FORMAT, buildCommandToConvertFontWithFontForge, } from '../shared/index.js';
import { buildUseConvert, transform_input_output_file_array, } from './base.js';
import { handleCommand } from './command.js';
const IOFontForge = BuildBaseFileInputOutputModel.superRefine(transform_input_output_file_array(FONT_FORMAT, FONT_FORMAT));
export const useConvertFontWithFontForge = buildUseConvert(FONT_FORMAT, FONT_FORMAT, 'fontforge');
export async function convertFontWithFontForge(source) {
    const input = IOFontForge.parse(source);
    const list = await buildCommandToConvertFontWithFontForge(input);
    for (const cmd of list) {
        await handleCommand(cmd);
    }
    return input.output.file.path;
}
//# sourceMappingURL=font.js.map