/// <summary> /// Creates the images. /// </summary> protected void CreateImages(string lang, ref LocalizationFontConfig.FontConfig config, string charsetFile) { string filename = System.IO.Path.Combine(_toolDirectory, ToolTTF2Images); LocalizationCommand cmd = new LocalizationCommand(filename); config._imagesDir = LocalizationEditorUtils.CreateDirectoryIfNotExist(_toolDirectory, "Temp", lang, config._fontName); config._font_info = System.IO.Path.Combine(config._imagesDir, "font_info.txt"); cmd.SetRequiredParams(config._ttfFile, config._fontSize, config._imagesDir); cmd.AddOptionalParams("-p", config._border); cmd.AddOptionalParams("-C", charsetFile); cmd.Execute(); _buildProgress += _buildstep; EditorUtility.DisplayCancelableProgressBar("Fonts maker", "Building...", _buildProgress); }
/// <summary> /// Makes the atlas. /// </summary> protected void MakeAtlas(string lang, ref LocalizationFontConfig.FontConfig config) { string filename = System.IO.Path.Combine(_toolDirectory, ToolAtlasMaker); string path = LocalizationEditorUtils.CreateDirectoryIfNotExist(_workDirectory, "Fonts", lang); config._atlasFile = System.IO.Path.Combine(path, config._fontName + ".png"); LocalizationCommand cmd = new LocalizationCommand("python"); cmd.SetRequiredParams(filename, config._imagesDir, config._atlasFile); cmd.AddOptionalParams("-p", config._padding); cmd.Execute(); _buildProgress += _buildstep; EditorUtility.DisplayCancelableProgressBar("Fonts maker", "Building...", _buildProgress); }