The adafruit_display_text library currently has two different types of label functionss in it. This page will go over those label functions and the differences between them. If you are less concerned about the details and just want to know which to use for your new project, go with BitmapLabel.
This is the original Label class. Each glyph within the text is stored in its own Bitmap and TileGrid objects, and those all get put into a single Group object. Because Group has a
max_size that determines how many things can be added to it, Label must choose a
max_size to use for the underlying Group. This is why you must pass either the
max_glyphs parameter when you initialize the Label. It needs to know how many things to make room for in its Group. If you don't pass in one or the other, you'll get an error.
If you set a
background_color, then the background will get its own TileGrid and Bitmap as well. The diagram above depicts a Label with no background Bitmap in it.
This is a newer class that was introduced more recently after many features were added into the original Label class. In the BitmapLabel, all of the glyphs are stored inside of a single Bitmap and TileGrid. This tends to result in lower memory usage, especially for long strings.
Since all of the glyphs are inside of a single Bitmap, it does not need to base the Group's
max_size on the number of characters in the string. Any BitmapLabel can hold any number of characters; there is no specific maximum other than RAM and screen real estate. BitmapLabel does accept a
max_glyphs parameter, but its value is ignored. This parameter is provided only for compatibility with the Label class so that code can be very easily swapped from one to the other without generating errors. BitmapLabel typically will use a little bit less RAM -- it can be helpful sometimes in larger projects to switch from Label to BitmapLabel to save more RAM for your projects other needs.
BitmapLabel can be used with