pythonarcade / arcade

Easy to use Python library for creating 2D arcade games.
http://arcade.academy
Other
1.68k stars 320 forks source link

In-depth documentation on loading custom fonts #1171

Open pushfoo opened 2 years ago

pushfoo commented 2 years ago

Documentation request:

What documentation needs to change?

A number of text-related locations need to link to a new tutorial covering:

  1. Why you should ship fonts with your game
  2. Suggestions for where to find fonts, good licenses, and how to comply with them
  3. Common hang-ups, such as figuring out the correct name of a font
  4. Suggestions for a good directory structure
  5. 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:

  1. a recommended place where users can find permissively licensed fonts
  2. 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 .

pvcraven commented 2 years ago

This is where having a 'manual' to house longer discussions would be nice.

pushfoo commented 2 years ago

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.

einarf commented 1 month ago

We should link to the pyglet documentation as much as possible. Spending time documenting it in pyglet is a better use of everyone's time. We can mention it in a section about text.