update your first 2D game font information

This commit is contained in:
skyace65
2022-01-27 22:24:39 -05:00
parent b59b12f2cd
commit a0d4f8473c
4 changed files with 6 additions and 5 deletions
@@ -36,21 +36,22 @@ Inspector. The default font for ``Control`` nodes is small and doesn't scale
well. There is a font file included in the game assets called
"Xolonium-Regular.ttf". To use this font, do the following:
1. Under "Custom Fonts", choose "New Font"
1. Under **Theme overrides > Fonts** click on the empty box and select "New DynamicFont"
.. image:: img/custom_font1.png
2. Click on the "Font" you added, and under "Font/Data/0",
2. Click on the "DynamicFont" you added, and under **Font > FontData**,
choose "Load" and select the "Xolonium-Regular.ttf" file.
.. image:: img/custom_font2.png
Set the "Size" property under ``Settings``, ``64`` works well.
.. image:: img/custom_font3.png
Once you've done this on the ``ScoreLabel``, you can click the down arrow next
to the Font property and choose "Copy", then "Paste" it in the same place
on the other two Control nodes.
Set "Custom Font Size" property of the ``ScoreLabel``. A setting of ``64`` works well.
.. image:: img/custom_font3.png
.. note:: **Anchors and Margins:** ``Control`` nodes have a position and size,
but they also have anchors and margins. Anchors define the origin -
Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB