The Resource view is where you import and manage the external assets a project uses. Resources imported here become available to every screen and component, and are converted and embedded into the generated firmware at build time.
Overview
Switch to the Resource view from the view bar.
| Resource type | Description |
|---|---|
| Image | Raster assets used by image components. PNG, JPG and BMP are accepted. |
| Font | Font files (*.ttf, *.otf, *.woff) used to build font libraries. |
See the codegen guide for how imported resources become generated code.
Resource scope
A project reads its uploads from one of two places:
| Scope | What it means |
|---|---|
| This project | Only this project sees the images and fonts you upload. A new project starts here. |
| Shared pool | Every project set to the shared pool reads the same uploads, so artwork you reuse across several designs is imported once. |
The Resource view lists exactly the scope the project is set to: what you upload here joins that scope, and the image and font pickers offer those same files to every screen. Choose the scope under Settings → Project → Configuration → Resource; see Settings.
Switching the scope copies nothing. Uploads that exist only in the scope you leave stop appearing here, and every reference to them stays broken until you upload those files again in the new scope. A project created before this setting existed reads the shared pool.
Removing a project also removes the uploads it owns. The shared pool keeps its files, and every other project keeps its own.
Importing images
- Open the Resource view from the view bar.
- Add a PNG, JPG or BMP image file.
- The image becomes available in the resource picker and can be assigned to any image component property.
Note
PNG, JPG and BMP are accepted. An upload over 2 MB warns and one over 5 MB is refused; a picture over 4 million pixels warns and one over 16 million is refused. Very large originals take longer to import, enlarge exported artifacts, and consume more RAM after decoding on the target device. If an image exceeds a limit, resize or compress it before importing.
See the image guide for the full image pipeline.
Importing fonts
- Open the Resource view from the view bar.
- Add a font file:
*.ttf,*.otf, or*.woff. - The font file becomes selectable when creating a font library.
A font file contains a complete character set. The characters the design actually uses are selected when you create a font library, which is converted into a C source array.
Note
Uploaded font files larger than 8 MB trigger a warning, and files larger than 12 MB are rejected. Conversion time and runtime memory use rise quickly as fonts grow, so when possible, start from a smaller source font or narrow the character set in the font library.
Warning
You are responsible for ensuring that you have the necessary rights and permissions for every resource you import and use.
Related guides
- Toolbar - the view bar used to switch to the Resource view.
- Settings - where the resource scope is chosen.
- Image - image handling, optimization, and usage.
- Font library - create a font library from an imported font file.
- Codegen - how resources become generated code.