The "vngen_set_lineheight" Function

Syntax

vngen_set_lineheight(id, type, multiplier);
ArgumentTypeDescription
idreal/stringThe ID of the entity to set lineheight (or keyword 'all' for all entities)
typeinteger/macroSets whether to set lineheight for text or labels
multiplierrealSets the global lineheight as a multiplier of font size

Description

VNgen uses a global lineheight multiplier to calculate the vertical space between lines of text (relative to the height of the current font, in pixels). This script changes the lineheight multiplier for all forms of text drawn by VNgen, or overrides it for a specific element, where a value of 1 equals no extra separation between lines.

Lineheight is set to 1.5 by default.

note

Tip: If changes to lineheight aren't persisting, try running this script with vngen_script_execute_ext!

Example

vngen_set_lineheight(all, vngen_type_text, 2);
vngen_set_lineheight("label_names", vngen_type_label, 1);