Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/defold/doc
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed Nov 13, 2024
2 parents 5ba5e54 + b139dd0 commit b96a191
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/en/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,10 @@
"path": "/manuals/font",
"name": "Font"
},
{
"path": "/extension-fontgen",
"name": "Runtime TTF Font"
},
{
"path": "/manuals/resource",
"name": "Resource management"
Expand Down
8 changes: 7 additions & 1 deletion docs/en/manuals/font.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ Fonts added to your project are automatically converted into a texture format th
- Bitmap
- Distance field

## Runtime generated fonts

For the developers that are looking to minimize the download size and runtime consumption, we have recently added a way to generate font glyphs at runtime using a .ttf font.

[Runtime Fonts](/extension-fontgen) - Use a .ttf font at runtime

## Creating a font

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>.
Expand Down Expand Up @@ -161,4 +167,4 @@ For example - to generate a gradient in a shader fragment, simply write:

`float horizontal_gradient = fract(var_texcoord0.y / texture_size_recip.w);`

For more information about shader uniforms, see the [Shader manual](/manuals/shader).
For more information about shader uniforms, see the [Shader manual](/manuals/shader).

0 comments on commit b96a191

Please sign in to comment.