You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/manuals/font.md
+77-6Lines changed: 77 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -16,11 +16,6 @@ Fonts added to your project are automatically converted into a texture format th
16
16
- Bitmap
17
17
- Distance field
18
18
19
-
::: sidenote
20
-
It is possible to [generate font glyphs at runtime](/extension-fontgen) from a bundled TrueType font instead of generating and including a font texture in the application bundle. This approach can greatly reduce the download size and runtime memory consumption of a Defold game.
21
-
:::
22
-
23
-
24
19
## Creating a font
25
20
26
21
To create a font for use in Defold, create a new Font file by selecting <kbd>File ▸ New...</kbd> from the menu, then select <kbd>Font</kbd>. You can also <kbd>right click</kbd> a location in the *Assets* browser and select <kbd>New... ▸ Font</kbd>.
@@ -97,7 +92,7 @@ space ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E
97
92
*Cache Width/Height*
98
93
: Constrains the size of the glyph cache bitmap. When the engine renders text, it looks up the glyph from the cache bitmap. If it does not exist there, it will be added to the cache before rendering. If the cache bitmap is too small to contain all the glyphs the engine is asked to render, an error is signalled (`ERROR:RENDER: Out of available cache cells! Consider increasing cache_width or cache_height for the font.`).
99
94
100
-
If set to 0 the cache size is set automatically.
95
+
If set to 0 the cache size is set automatically, and will grow to 2048x4096 max.
101
96
102
97
## Distance field fonts
103
98
@@ -167,3 +162,79 @@ For example - to generate a gradient in a shader fragment, simply write:
0 commit comments