Skip to content

Commit 9468ddc

Browse files
clydebarrowkbx81
authored andcommitted
[font] Update size and bpp documentation (#4766)
1 parent ebcb64b commit 9468ddc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: components/font.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,11 @@ Configuration variables:
131131

132132
- **id** (**Required**, :ref:`config-id`): The ID with which you will be able to reference the font later
133133
in your display code.
134-
- **size** (*Optional*, int): The size of the font in pt (not pixel!).
135-
If you want to use the same font in different sizes, create two font objects. Note: *size* is ignored
136-
by bitmap fonts. Defaults to ``20``.
134+
- **size** (*Optional*, int): The desired size of the font. This will be the size (height) of the font in pixels
135+
when rendered. If you want to use the same font in different sizes, create two font objects.
136+
Defaults to ``20`` for scalable fonts and the first available size for bitmap fonts. Requesting a size that is not available in a bitmap-only font will result in an error.
137137
- **bpp** (*Optional*, int): The bit depth of the rendered font from OpenType/TrueType, for anti-aliasing. Can be ``1``, ``2``, ``4``, ``8``. Defaults to ``1``.
138+
If set to 1 and the font has a bitmap version available at the requested size, that will be used. Otherwise the font will be rendered from the vector representation.
138139
- **glyphsets** (*Optional*, list): A list of glyphsets you plan to use. Defaults to
139140
``GF_Latin_Kernel``, which contains the basic characters and necessary punctuation and symbols for
140141
the English language. ``GF_Latin_Core`` is a more extended set that includes glyphs for the

0 commit comments

Comments
 (0)