In-depth documentation on loading custom fonts
Documentation request:
What documentation needs to change?
A number of text-related locations need to link to a new tutorial covering:
- Why you should ship fonts with your game
- Suggestions for where to find fonts, good licenses, and how to comply with them
- Common hang-ups, such as figuring out the correct name of a font
- Suggestions for a good directory structure
- A finished example, with directory structure
Where is it located?
Existing doc that needs to link the new tutorial can be found here:
| Function / Object | Location in Source |
|---|---|
| arcade.Text | arcade/text_pyglet.py, Line 17 |
| arcade.load_font | arcade/text_pyglet.py, Line 121 |
| arcade.gui.UILabel | arcade/gui/widgets.py, Line 724 |
| arcade.gui.UITextArea | arcade/gui/widgets.py, Line 894 |
What is wrong with it? How can it be improved?
While helping a user, it seemed like they thought you could only use fonts shipped with arcade, and didn't understand that you can use arbitrary TTF fonts.
Also, I was confused while helping them because some font viewers (Gnome) include font weights when displaying names ("Grand Hotel, Regular" instead of "Grand Hotel" as expected by arcade.Text). Ordinary users will probably have a lot of trouble trouble with this.
In my experience, asset licensing has also been a consistent hangup when dealing with game jams or hackathons. It would be helpful if we gave users the following:
- a recommended place where users can find permissively licensed fonts
- information on how to comply with licenses such as the SIL Open Font License
This will prevent them from getting disqualified from restrictive game jams such as pyweek and give them more flexibility than anything we ship with arcade to address #1135 or #1011 .
This is where having a 'manual' to house longer discussions would be nice.
Users are still having issues with the font file's name vs the font file. It may be worth bundling a tool to help with this.