From 709fe6aab24e244180d785545e8a2f3330f33485 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 1 Aug 2024 03:17:07 +0200 Subject: [PATCH] Add variable font weight table to Using fonts --- tutorials/ui/gui_using_fonts.rst | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/tutorials/ui/gui_using_fonts.rst b/tutorials/ui/gui_using_fonts.rst index 970c3d2ab..5da7ea2a2 100644 --- a/tutorials/ui/gui_using_fonts.rst +++ b/tutorials/ui/gui_using_fonts.rst @@ -555,10 +555,33 @@ For example, here's the `Inter V `__ font with a .. tip:: - While variable font axis names and scales aren't standardized, some common - conventions are usually followed by font designers. For instance, the - *weight* axis typically uses ``400`` as the "regular" font weight and - ``700`` as the "bold" font weight. + While variable font axis names and scales aren't standardized, + some common conventions are usually followed by font designers. + The *weight* axis is standardized in OpenType to work as follows: + + +------------+--------------------------------+ + | Axis value | Effective font weight | + +============+================================+ + | ``100`` | Thin (Hairline) | + +------------+--------------------------------+ + | ``200`` | Extra Light (Ultra Light) | + +------------+--------------------------------+ + | ``300`` | Light | + +------------+--------------------------------+ + | ``400`` | **Regular (Normal)** | + +------------+--------------------------------+ + | ``500`` | Medium | + +------------+--------------------------------+ + | ``600`` | Semi-Bold (Demi-Bold) | + +------------+--------------------------------+ + | ``700`` | **Bold** | + +------------+--------------------------------+ + | ``800`` | Extra Bold (Ultra Bold) | + +------------+--------------------------------+ + | ``900`` | Black (Heavy) | + +------------+--------------------------------+ + | ``950`` | Extra Black (Ultra Black) | + +------------+--------------------------------+ You can save the FontVariation to a ``.tres`` resource file to reuse it in other places: