Tools

Defold 1.14.1 brings sharper text to browser games

by

A game menu can look excellent on a desktop monitor and become difficult to read on a phone. Small labels, scaled text and a crowded inventory are useful places to start when evaluating the new font options in Defold 1.14.1. The November release gives web developers another way to approach that problem, alongside more control over HTML5 rendering resolution.

The official Defold 1.14.1 announcement introduces runtime vector fonts, dynamic glyph generation and color emoji support. Existing SDF font resources retain their rendering mode, while newly created fonts default to Vector. That makes this an update to review deliberately: adding a new font and continuing to use an existing one can produce different configurations within the same project.

If the Defold + Minit Game Jam gave you a reason to try the engine, a small menu prototype is a manageable next experiment. You do not need to migrate every label in a finished game to learn what the new renderer changes.

Choose rendering and generation separately

Defold's font manual distinguishes the rendering mode from the moment glyphs are generated. Bitmap uses rasterized glyphs, SDF stores distance information, and Vector draws glyph faces from curve data. Static generation prepares selected characters during the build; Dynamic includes the source font and generates glyphs at runtime. SDF and Vector support both generation choices.

For a first comparison, duplicate one interface scene and change only its font configuration. Keep the copy, layout, background and target resolution identical. A score counter, a paragraph of instructions and a button with a long label give you three quite different tests. Look at the smallest text first, because a beautiful title can hide an unreadable settings panel.

Defold font example showing Hello World in white and cyan alongside a winking yellow emoji.
Runtime vector font and emoji example from the Defold 1.14.1 release announcement. Credit: Defold Foundation.

Check browser compatibility before switching

Vector fonts do not support WebGL 1 or OpenGL ES 2.0, and Defold does not automatically substitute SDF rendering on unsupported devices. The release also excludes those legacy shader targets by default. Projects that still require them need an explicit review of their shader settings and font choices.

That is a good reason to keep a working baseline build. Open both versions on the devices you actually support and compare the same screens. Check exported HTML5 builds as well as the editor preview. Record a rendering failure separately from a layout failure: missing letters and a clipped translation may appear in the same menu but require different fixes.

The distinction resembles the one in our guide to texture downloads and GPU memory, where a smaller file does not necessarily mean a smaller runtime cost. Measure the result in your game before treating a new format as an automatic optimization.

Prepare the text players encounter first

Dynamic font generation requires the full text layout system to be enabled through the project's App Manifest. The manual also documents Prewarm Text and an asynchronous prewarming function for glyphs that will be needed later. Font materials must match the selected mode, including the separate material on Label components.

For your experiment, gather the text from the opening screen, the first tutorial and the pause menu. Include the characters used by each supported language, then exercise those screens in the order a new player encounters them. Follow that with a less common screen, such as credits or an item description, to expose assumptions based only on the opening menu.

Visual polish is easier to judge in a complete interaction. Our look at Songs of Hyrule's presentation is a useful companion when deciding which small interface improvements deserve attention first.

Test text alongside rendering resolution

The release adds minimum and maximum pixel ratios for HTML5 projects using High DPI rendering. A resolution cap can be another variable in your test, but change it separately from the font setup so you can tell which adjustment caused the difference.

Try a busy scene with the menu open, then resize the browser and repeat on a phone. Note text clarity, frame time and the point at which a label becomes too small to read comfortably. The kind of camera and presentation work covered in our LittleJS 1.28 overview benefits from the same habit of checking the whole scene.

A useful outcome is a short decision you can keep with the project: which fonts use which modes, which browsers you tested, and which screens still need work. That gives the next interface change a clear starting point.

Leave a Reply

Your email address will not be published. Required fields are marked *