public static void ReplaceAllPHFonts()
        {
            foreach (var kvp in _PHFontNameToAssetName)
            {
                List <string> flags = new List <string>()
                {
                    ""
                };
                var allflags = CapsDistributeEditor.GetOptionalDistributes();
                for (int i = 0; i < allflags.Length; ++i)
                {
                    var flag = allflags[i];
                    if (!ResManager.GetValidDistributeFlagsSet().Contains(flag))
                    {
                        flags.Add(flag);
                    }
                }
                flags.AddRange(ResManager.GetValidDistributeFlags());
                var list = GetFallbackFontNames(kvp.Key, flags.ToArray());

                var fiph = AssetImporter.GetAtPath(kvp.Value) as TrueTypeFontImporter;
                if (fiph != null)
                {
                    if (!ListEquals(fiph.fontNames, list))
                    {
                        fiph.fontNames      = list.ToArray();
                        fiph.fontReferences = null;
                        EditorUtility.SetDirty(fiph);
                        AssetDatabase.WriteImportSettingsIfDirty(kvp.Value);
                        AssetDatabase.ImportAsset(kvp.Value);
                        AssetDatabase.Refresh();
                    }
                }
            }
        }
        public static void Init()
        {
            var win = GetWindow <DistributeSelectWindow>();

            win.titleContent        = new GUIContent("Distribute Flags");
            win.DistributeFlags     = new Dictionary <string, bool>();
            win.DistributeFlagOrder = new LinkedList <string>();
            var allflags = CapsDistributeEditor.GetOptionalDistributes();

            for (int i = 0; i < allflags.Length; ++i)
            {
                win.DistributeFlags[allflags[i]] = false;
            }
            var selflags = ResManager.PreRuntimeDFlags;

            for (int i = 0; i < selflags.Count; ++i)
            {
                win.SelectDistributeFlag(selflags[i], true);
            }
            win.SaveDistributeFlags();
        }