mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 19:29:06 +00:00
Standardize RST header syntax
This commit is contained in:
@@ -70,7 +70,7 @@ Container types
|
||||
Godot provides several container types out of the box as they serve different purposes:
|
||||
|
||||
Box Containers
|
||||
^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Arranges child controls vertically or horizontally (via :ref:`HBoxContainer <class_HBoxContainer>` and
|
||||
:ref:`VBoxContainer <class_VBoxContainer>`). In the opposite of the designated direction
|
||||
@@ -81,7 +81,7 @@ Arranges child controls vertically or horizontally (via :ref:`HBoxContainer <cla
|
||||
These containers make use of the *Stretch Ratio* property for children with the *Expand* flag set.
|
||||
|
||||
Grid Container
|
||||
^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Arranges child controls in a grid layout (via :ref:`GridContainer <class_GridContainer>`, amount
|
||||
of columns must be specified). Uses both the vertical and horizontal expand flags.
|
||||
@@ -89,7 +89,7 @@ of columns must be specified). Uses both the vertical and horizontal expand flag
|
||||
.. image:: img/containers_grid.png
|
||||
|
||||
Margin Container
|
||||
^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Child controls are expanded towards the bounds of this control (via
|
||||
:ref:`MarginContainer <class_MarginContainer>`). Padding will be added on the margins
|
||||
@@ -103,7 +103,7 @@ constants overrides section of each control:
|
||||
.. image:: img/containers_margin_constants.png
|
||||
|
||||
Tab Container
|
||||
^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Allows you to place several child controls stacked on top of each other (via
|
||||
:ref:`TabContainer <class_TabContainer>`), with only the *current* one visible.
|
||||
@@ -119,7 +119,7 @@ The titles are generated from the node names by default (although they can be ov
|
||||
Settings such as tab placement and *StyleBox* can be modified in the *TabContainer* theme overrides.
|
||||
|
||||
Split Container
|
||||
^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
Accepts only one or two children controls, then places them side to side with a divisor
|
||||
(via :ref:`HSplitContainer <class_HSplitContainer>` and :ref:`VSplitContainer <class_VSplitContainer>`).
|
||||
@@ -133,7 +133,7 @@ The divisor can be dragged around to change the size relation between both child
|
||||
|
||||
|
||||
PanelContainer
|
||||
^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
A container that draws a *StyleBox*, then expands children to cover its whole area
|
||||
(via :ref:`PanelContainer <class_PanelContainer>`, respecting the *StyleBox* margins).
|
||||
@@ -144,7 +144,7 @@ It respects both the horizontal and vertical sizing options.
|
||||
This container is useful as top-level, or just to add custom backgrounds to sections of a layout.
|
||||
|
||||
ScrollContainer
|
||||
^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
Accepts a single child node. If this node is bigger than the container, scrollbars will be added
|
||||
to allow panning the node around (via :ref:`ScrollContainer <class_ScrollContainer>`). Both
|
||||
@@ -160,7 +160,7 @@ Mouse wheel and touch drag (when touch is available) are also valid ways to pan
|
||||
As in the example above, one of the most common ways to use this container is together with a *VBoxContainer* as child.
|
||||
|
||||
AspectRatioContainer
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
A container type that arranges its child controls in a way that preserves their proportions
|
||||
automatically when the container is resized.
|
||||
@@ -176,7 +176,7 @@ and you want the child elements to scale proportionally without losing their int
|
||||
.. image:: img/containers_aspectratio_drag.webp
|
||||
|
||||
FlowContainer
|
||||
^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
FlowContainer is a container that arranges its child controls either horizontally or vertically,
|
||||
(via :ref:`HFlowContainer <class_HFlowContainer>` and via :ref:`VFlowContainer <class_VFlowContainer>`).
|
||||
@@ -190,7 +190,7 @@ useful for creating flexible layouts where the child controls adjust automatical
|
||||
.. image:: img/containers_hflow_drag.webp
|
||||
|
||||
CenterContainer
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
CenterContainer is a container that automatically keeps all of its child controls centered within it at their minimum size.
|
||||
It ensures that the child controls are always aligned to the center, making it easier to create centered layouts without manual positioning.
|
||||
@@ -201,7 +201,7 @@ It ensures that the child controls are always aligned to the center, making it e
|
||||
.. image:: img/containers_center_drag.webp
|
||||
|
||||
SubViewportContainer
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This is a special control that will only accept a single *Viewport* node as child, and it will display
|
||||
it as if it was an image (via :ref:`SubViewportContainer <class_SubViewportContainer>`).
|
||||
|
||||
@@ -216,7 +216,7 @@ Advanced font features
|
||||
.. _doc_using_fonts_antialiasing:
|
||||
|
||||
Antialiasing
|
||||
^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~
|
||||
|
||||
You can adjust how the font should be smoothed out when rendering by adjusting
|
||||
*antialiasing* and *hinting*. These are different properties, with different use
|
||||
@@ -251,7 +251,7 @@ exploring.
|
||||
.. _doc_using_fonts_hinting:
|
||||
|
||||
Hinting
|
||||
^^^^^^^
|
||||
~~~~~~~
|
||||
|
||||
Hinting controls how aggressively glyph edges should be snapped to pixels when
|
||||
rasterizing the font. **None** results in the smoothest appearance, which can
|
||||
@@ -278,7 +278,7 @@ preference, you may prefer using one hinting mode over the other.
|
||||
.. _doc_using_fonts_subpixel_positioning:
|
||||
|
||||
Subpixel positioning
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Subpixel positioning can be adjusted. This is a `FreeType <https://freetype.org/>`__
|
||||
feature that allows glyphs to be rendered more closely to their intended form.
|
||||
@@ -305,7 +305,7 @@ effect at smaller font sizes.
|
||||
.. _doc_using_fonts_mipmaps:
|
||||
|
||||
Mipmaps
|
||||
^^^^^^^
|
||||
~~~~~~~
|
||||
|
||||
By default, fonts do not have mipmaps generated to reduce memory usage and speed
|
||||
up rasterization. However, this can cause downscaled fonts to become grainy. This
|
||||
@@ -324,7 +324,7 @@ resistant to graininess out of the box.
|
||||
.. _doc_using_fonts_msdf:
|
||||
|
||||
MSDF font rendering
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Multi-channel signed distance field (MSDF) font rendering allows rendering fonts
|
||||
at any size, without having to re-rasterize them when their size changes.
|
||||
@@ -371,7 +371,7 @@ to the Import dock, enable **Multichannel Signed Distance Field**, then click
|
||||
.. _doc_using_fonts_emoji:
|
||||
|
||||
Using emoji
|
||||
^^^^^^^^^^^
|
||||
~~~~~~~~~~~
|
||||
|
||||
Godot has limited support for emoji fonts:
|
||||
|
||||
@@ -421,7 +421,7 @@ emoji font:
|
||||
It's possible to use a system font as a fallback font too.
|
||||
|
||||
Using icon fonts
|
||||
^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Tools like `Fontello <https://fontello.com/>`__ can be used to generate font
|
||||
files containing vectors imported from SVG files. This can be used to render
|
||||
@@ -465,7 +465,7 @@ reserved for use by custom fonts and doesn't contain standard glyphs by design.
|
||||
.. _doc_using_fonts_font_fallbacks:
|
||||
|
||||
Font fallbacks
|
||||
^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Godot supports defining one or more fallbacks when the main font lacks a glyph
|
||||
to be displayed. There are 2 main use cases for defining font fallbacks:
|
||||
@@ -513,7 +513,7 @@ fallbacks.
|
||||
.. _doc_using_fonts_variable_fonts:
|
||||
|
||||
Variable fonts
|
||||
^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Godot has full support for `variable fonts <https://variablefonts.io/>`__, which
|
||||
allow you to use a single font file to represent various font weights and styles
|
||||
@@ -592,7 +592,7 @@ places:
|
||||
Saving FontVariation to an external resource file
|
||||
|
||||
Faux bold and italic
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
When writing text in bold or italic, using font variants specifically designed
|
||||
for this looks better. Spacing between glyphs will be more consistent when using
|
||||
@@ -630,7 +630,7 @@ character transform to a positive value will italicize the text. Recommended
|
||||
values are between ``0.2`` and ``0.4`` depending on the font.
|
||||
|
||||
Adjusting font spacing
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
For stylistic purposes or for better readability, you may want to adjust how a
|
||||
font is presented in Godot.
|
||||
@@ -659,7 +659,7 @@ displayed with stretching.
|
||||
.. _doc_using_fonts_opentype_font_features:
|
||||
|
||||
OpenType font features
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Godot supports enabling OpenType font features, which are a standardized way to
|
||||
define alternate characters that can be toggled without having to swap font
|
||||
@@ -738,7 +738,7 @@ features, then unchecking them in the inspector:
|
||||
.. _doc_using_fonts_system_fonts:
|
||||
|
||||
System fonts
|
||||
^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~
|
||||
|
||||
.. warning::
|
||||
|
||||
@@ -827,7 +827,7 @@ for details.
|
||||
.. _doc_using_fonts_font_prerendering:
|
||||
|
||||
Font prerendering
|
||||
^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
When using traditional rasterized fonts, Godot caches glyphs on a per-font and
|
||||
per-size basis. This reduces stuttering, but it can still occur the first time a
|
||||
@@ -949,7 +949,7 @@ covering many more languages, such as French, German and Spanish. For Russian,
|
||||
**Cyrillic** needs to be enabled, and so on.
|
||||
|
||||
Default project font properties
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In the **GUI > Theme** section of the advanced Project Settings, you can choose
|
||||
how the default font should be rendered:
|
||||
|
||||
Reference in New Issue
Block a user