summaryrefslogtreecommitdiff
path: root/src/abi.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/abi.zig')
-rw-r--r--src/abi.zig7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/abi.zig b/src/abi.zig
index 327110d..cf7b838 100644
--- a/src/abi.zig
+++ b/src/abi.zig
@@ -346,8 +346,11 @@ pub const Command = union(enum) {
/// The blend for the 2D commands after it (`rect`, `shape`, `image`;
/// `text` and `clear` ignore it). Each frame starts with `alpha`.
blend: BlendMode,
- /// One line from its top left corner; scale 1 is a 13 px font.
- text: struct { x: f32, y: f32, scale: f32, color: Color, bytes: []const u8, face: Face = .mono },
+ /// One line from its top left corner; scale 1 is a 13 px font. With
+ /// `raster` (not 0) it is laid out and rasterized at that scale and
+ /// drawn at `scale`: steady under a moving camera, where text shaped
+ /// anew at every size would shift letter against letter.
+ text: struct { x: f32, y: f32, scale: f32, color: Color, bytes: []const u8, face: Face = .mono, raster: f32 = 0 },
clip: ?Rect,
/// Logical canvas size; the host scales the window to fit.
canvas: struct { w: u32, h: u32 },