Add Custom Fonts
Adding custom fonts allows for more personalized text rendering for interfaces and other text elements.
Add TTF Font Files to the Font Assets Directory
First, place the .ttf
font files in the font assets directory. The path is as follows:
For example, place the pop.ttf
file into the plugins/Xerr/core/assets/font/ttf/
directory.
Create the Configuration File
Next, create a configuration file named [custom].yml
in the plugins/Xerr/core/assets/font/
directory to define the font settings.
The directory structure will look like this:
Edit the Configuration File
In the corresponding configuration file, set the relevant parameters for the font. Here is an example configuration:
Reload the Configuration
After completing the configuration, the plugin needs to reload the configuration file to apply the settings.
Run the following command to reload the plugin's configuration and generate the resource pack:
Summary
By following the above steps, you can easily add custom fonts to the plugin and adjust font size and clarity. Remember to reload the plugin and the resource pack after modifying the configuration to ensure all changes take effect smoothly.