There are a few different ways to place your text with display_text labels. All of these settings are available for both Label and BitmapLabel.
The label can be placed using x, y coordinates. The default origin is located on the far left horizontally, and half the height vertically as shown in the image above.
Many fonts have glyphs with descenders that drop down below the baseline. This image illustrates some of them:
Not all fonts use all of the same descenders on their glyphs. So your font may look different, but the concept should work the same for any that it does have. This example shows 'y' glyphs descending below the baseline and the effect of the
If you'd like more precise control over the placement of your text, you can use
anchored_position instead of
y coordinates. With this method, you can set the origin point anywhere you want within your Label. It's particularly useful for centering text within the display, or aligning it to the right edge of the display.
anchor_point is a tuple containing two float values. This is the point that your Label will get positioned relative to.
0.0 being left and top, and
1.0 being right and bottom with values between representing their location within the rectangle that makes up your label. The default is
(0.0, 0.0) which is the top left corner.
When you set the