From 45f705a5e590c3dfddc0a544e66beb9bf6205a4d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 12:53:22 -0300 Subject: sketchbook: text rasterized at one scale and drawn at another (f.textScaled), steady under a moving camera --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 6062e60..e4718af 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,14 @@ bytes)` measures it. The three mono faces advance alike (0.6 em: whole pixels at 25, 30, 35, 45 and 60 px and at their doubles), so columns of text need no measuring. The web host draws every face as its one. +Text is shaped for the size it is drawn at, so under a camera that zooms +its letters would shift against each other from frame to frame. +`f.textScaled(face, x, y, scale, raster, bytes, color)` lays the line out +and rasterizes it at `raster` and draws that at `scale`, unsnapped: give it +the scale the move ends on (the larger of its ends) while the camera +moves, and `textIn` again once it rests. One texture serves the whole +move. The web host ignores `raster`. + `f.openFile("open", .{ .pattern = "wav;flac" })` shows the system's file dialog; the answer comes back as the console line `open `, so it reaches the sketch's `command` like anything typed there. `f.run(line)` -- cgit v1.3