MultiFontPack (3,789 fonts)

Assets + Accessories MultiFontPack (3,789 fonts)

Download [968.63 MB]
πŸ™†β€β™€οΈ If you think this asset is valuable, please leave a recommendation or review for the community.
πŸ™‹β€β™€οΈ Reporting bugs or issues will help me improve the plugin and help others.

MultiFontPack
● This asset supports 3,789 fonts and provides usage guides for Scene Creators and plugin developers.
● This asset was created to enable the use of various fonts in VaM, and it provides a total of 3,789 fonts.
● All fonts included in this asset can be modified and redistributed under the OFL (Open Font License).
● It includes a built-in API for plugin developers to quickly search and apply fonts.
● In particular, it offers triggers for non-developers, allowing immediate application to UIButton, UIToggle, and UISlider.

● ISO 15924 and ISO 8859 standards were used for Script (Writing System) classification.
● ISO 3166 standard was used for representing countries worldwide.
● ISO 639 standard was used for classifying dialect scripts by country.
● The classification of fonts by Feeling and Theme, as well as the samples, were taken from fonts.google.com, and many of the fonts were also sourced from there.

Asset&Plugin Install
● Just add plugin to Any Atom. (It is recommended to place it in a Session Plugin so that it can be accessed commonly.)
History
● 20260729 v0.1 : initial version
● 20260730 v0.2 : fixed but not yet released. please report any other issues !!!
- f
ixed the issue where, after 'Display Only Favorite', the Font Filter still had an effect ()


----------------------------------------
01. Load Asset as Plugin
Begin by loading the asset into any Atom as a plugin.
- Open the Atom of your choice
- Add the asset as a plugin

02 Set Trigger Order (Important)
You must first configure the 'Trigger - Apply Font Name' before setting the Atom name trigger.
- Configure Trigger - Apply Font Name to set the font
- Then configure 'Trigger - Apply UI Atom Name' to specify the Atom

03 Paste Font Name
Use the FontUI to copy the desired font name and paste it into the 'Trigger - Apply Font Name'.
- Copy font name via FontUI
- Paste into 'Trigger - Apply Font Name'

04 Enter Atom Name
Specify the Atom name in 'Trigger - Apply UI Atom Name'. For multiple Atoms, separate names with commas.
- Enter Atom name directly
- Use commas (,) to separate multiple Atom names

05 Supported Atom Types
Currently, only UIButton, UIToggle, and UISlider Atom types are supported for applying fonts.
- Supported types: UIButton
- Supported types: UIToggle
- Supported types: UISlider

There are two ways for developers to use MultiFontPack:
One is to load all fonts and then select through a filter, and the other is to use predefined favorite fonts. Here, we will cover both methods.
In both cases, add MultiFontPackLoader.cs to whatPlugin.cslist as shown below. MultiFontPackLoader.cs has no dependencies

C#:
.
.
14mhz.Asset-MultiFontPack.1:/Custom/Scripts/14mhz/MultiFontPack/src/MultiFontPackLoader.cs
The first method is using a filter.
Initialization is carried out as follows.

C#:
void buildUI()
{
    MultiFontPackLoader.init(this); // very important code
    var _all = MultiFontPackLoader.listAll(this);
    var scrp = MultiFontPackLoader.group_scripts();
    var cate = MultiFontPackLoader.group_categories();
    var feel = MultiFontPackLoader.group_feelings();
    var thms = MultiFontPackLoader.group_themes();
    SCRP_SELECT = addChooser(this, true, "Script", scrp, callback);
    CATE_SELECT = addChooser(this, true, "Category", cate, callback);
    FEEL_SELECT = addChooser(this, true, "Feeling", feel, callback);
    THMS_SELECT = addChooser(this, true, "Theme", thms, callback);
    FONT_SELECT = addChooser(this, false, "Font", _all, callback);
    TEXTEXAMPLE = addText(this, false, text, 390 + 670);
}
When each filter is selected, the fonts that can ultimately be chosen are implemented as follows.
C#:
void callback(String name, String val)
{
    if (false) {}
    else if (name == "Script" || name == "Category" || name == "Feeling" || name == "Theme")
    {
        var scrp = SCRP_SELECT.val;
        var cate = CATE_SELECT.val;
        var feel = FEEL_SELECT.val;
        var thms = THMS_SELECT.val;
        var filt = MultiFontPackLoader.listFilter(this, scrp, cate, feel, thms);
        FONT_SELECT.choices = filt;
    }
}
Finally, the method for applying the selected font is as follows.
C#:
void apply()
{
    var font_name = from font chooser;
    var txt_compo = TEXTEXAMPLE.dynamicText.gameObject.GetComponentInChildren<Text>();
    if (false)
    {// alternative implementation
        MultiFontPackLoader.set(this, font_name, txt_compo);
    }
    else
    {
        MultiFontPackLoader.set(this, font_name, (_ttf, font) =>
        {
            SuperController.LogMessage($"[INF] MultiFontPackLoader set bundle [{_ttf}] font [{font}]");
            txt_compo.font = font;
        });
    }
}
Both expressions for MultiFontPackLoader.set work, but if you clearly know the Text Component, the first method is considered simpler.
The second method is using a predefined list of favorite fonts.

C#:
void buildUI()
{
    MultiFontPackLoader.init(this); // very important code
    var favorite = loadJson(this);
    FONT_SELECT = addChooser(this, false, "Font", favorite, callback);
    TEXTEXAMPLE = addText(this, true, MultiFontPackExampleCategory.text, 390 + 820);
}
The only difference from the first method is the initialization part; the rest is the same.
Simply put, it is like putting the favorite list directly into the Font Chooser.

The project files are stored at the link below, so you can download and use them after accessing it.


guide.png
----------------------------------------
React to this content...

Share this resource

Back
Top Bottom