Example #1
0
        static void RegenerateFontAsset(MenuCommand command)
        {
            FontAsset fontAsset = command.context as FontAsset;

            if (fontAsset != null)
            {
                FontAssetCreatorWindow.ShowFontAtlasCreatorWindow(fontAsset);
            }
        }
Example #2
0
        static void CreateFontAsset(MenuCommand command)
        {
            TrueTypeFontImporter importer = command.context as TrueTypeFontImporter;

            if (importer != null)
            {
                Font sourceFontFile = AssetDatabase.LoadAssetAtPath <Font>(importer.assetPath);

                if (sourceFontFile)
                {
                    FontAssetCreatorWindow.ShowFontAtlasCreatorWindow(sourceFontFile);
                }
            }
        }