Easy-ish guide to customize fonts for non git users! #975
OfficerKD637
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everyone!
Hope all is well is with y'all!
I have often noticed that one of the first things that people want to customize in the skin is their fonts but are not comfortable with using git or having to change a lot of code/files after every skin update.
Well, here is a (relatively) easy guide to add your custom fonts to the skin!
1. Adding the Font files to the main Kodi folder (This step only needs to be done once!)
Add your font files (.ttf or .otf for Kodi v20+) to the 'Fonts' folder inside the MAIN kodi folder (not inside the .kodi folder). To verify you're in the correct directory, check if the 'media' folder has all the different Kodi icons, applaunch_screen and splash images along with a 'Fonts' folder.
Go inside the Fonts folder and you'll already find arial.ttf and teletext.ttf
Place all your font files in this folder
Your font files should preferably have a Black, Bold, Regular and Light variant. If your font doesn't have a Black variant, you can simply substitute it with Bold when editing the xml files (discussed below).
Adding your font files here will retain them after every skin update!
2. Editing the Font.xml file
If you're on any desktop OS (Windows, MacOS, Linux, etc.) editing a xml file should be easy peasy
If you're on Android/iOS and have access to a computer, use the computer!
But if it's difficult to access a computer, use an online XML editor like: https://onlinexmltools.com/edit-xml
Copy and paste the contents of the Font.xml file (found here) in the online editor and add your own custom fontset(s)
Here's an example to understand how the formatting works:
Assuming the names of your font files that you placed in the 'Fonts' folder in the first step were MyCustomFont-Bold.ttf, MyCustomFont-Regular.ttf and MyCustomFont-Light.ttf, here's what the code should look like:
<fontset id="My Custom Font" unicode="true">
<include content="Font_Default">
<param name="font_black">MyCustomFont-Black.ttf</param>
(OR
<param name="font_black">MyCustomFont-Bold.ttf</param>
if Black variant is not available)<param name="font_bold">MyCustomFont-Bold.ttf</param>
<param name="font_regular">MyCustomFont-Regular.ttf</param>
<param name="font_light">MyCustomFont-Light.ttf</param>
<param name="aspect_system">0.8</param>
<param name="aspect_standard">0.89</param>
</include>
</fontset>
Adjust the "aspect_standard" value if you feel your font is too wide/narrow accordingly.
Now download this Font.xml file to your device and place it inside the 1080i folder inside the skin folder.
3. Placing the modified Font.xml file in the skin directory
If you're on a desktop OS, simply place this modified file in skin.arctic.fuse/1080i and reload the skin
But if you're on a device where copy/pasting files might be difficult due to the OS restricting file access permissions (eg. certain new Android versions), you can use Kodi's file manager to achieve this!
You'll need to add 2 sources to the FIle Manager; one where you'll have the modified Font.xml file stored and the second is the skin folder (addons/skin.arctic.fuse/1080i)
After you've added the 2 sources in the file manager, open the 'source' folder (the one where you have the modified Font.xml file) on one side of the file manager. Then open the 'destination' folder (the 1080i folder inside the skin directory) on the adjacent side.
These 2 sources should be open on either sides of the file manager concurrently for the copy/pasting to work (Read more here)
Select your modified Font.xml file > Open the context menu (if you don't have a dedicated keymap, you can long press the 'ok'/'select'/'enter' button on your remote) > Select Copy
This should automatically copy & paste the file inside your skin directory.
Now reload the skin and you should be able to access your new fonts from the Interface settings!
Since a skin update won't touch your main Kodi folder or the 'source' folder where you have your modified Font.xml file, you just need to copy/paste it with Kodi's File Manager and voila! Your custom fonts loaded in just a few seconds!
Feel free to reach out if you have any questions!
Beta Was this translation helpful? Give feedback.
All reactions