private static void ConsoleMode(string[] args) { bool processed = false; NftrFont font; // Import mode if (args[0] == "-i" && args.Length == 4) { processed = true; Console.WriteLine("Importing from:\n\t{0}\n\t{1}\nto:\n\t{2}", args[1], args[2], args[3]); font = new NftrFont(args[1], args[2]); font.Write(args[3]); } // Export mode if (args[0] == "-e" && args.Length == 4) { processed = true; Console.WriteLine("Exporting from:\n\t{0}\nto:\n\t{1}\n\t{2}", args[1], args[2], args[3]); font = new NftrFont(args[1]); font.Export(args[2], args[3]); } // Export to basic json if (args[0] == "-ejson" && args.Length == 3) { processed = true; Console.WriteLine("Exporting from:\n\t{0}\nto:\n\t{1}", args[1], args[2]); font = new NftrFont(args[1]); font.ExportInfoIntoJson(args[2]); } if (!processed) PrintHelp(); Console.WriteLine(); Console.WriteLine("Done!"); }
private static void TestSingle() { string fontPath = "/var/run/media/benito/2038A2E238A2B5E6"; fontPath += "/nds/projects/NDS/NerdFontTerminatoR/files/"; fontPath += "Ninokuni [CLEAN]/4096_font_b9.NFTR"; string outPath = "/home/benito/"; outPath += "test"; NftrFont font = new NftrFont(fontPath); font.Export(outPath + ".xml", outPath + ".png"); font = new NftrFont(outPath + ".xml", outPath + ".png"); font.Write(outPath + ".new"); Console.WriteLine("{0} written.", CompareFiles(fontPath, outPath + ".new") ? "Successfully" : "Unsuccessfully"); }