Conversation
This implements a glyph editor for built-in vector font data, parsing glyph bytecode (move/line/curve opcodes) into editable structure with zero heap allocations and provides: - Interactive canvas with grid, baseline, ascent/descent, and bearing guidelines - Color-coded control points (yellow=move, red=line, blue=curve control, green=curve endpoint) with selection highlighting - Mouse-based point selection (left-click primary, right-click secondary) via Euclidean hit testing in glyph coordinate space - Arrow-key point movement with Shift+arrow for paired control point manipulation in cubic bezier curves - Circular undo stack (8 deep) with coalescing for consecutive arrow key moves, so a single undo restores the full movement sequence - Clickable ASCII character grid (0x20-0x7E) and Prev/Next navigation - Zoom slider (2x-12x) with dynamic canvas origin centering Canvas rendering pre-computes the coordinate transform origin once per draw function rather than per-point, and a fe_draw_point() helper eliminates the duplicated selection-check pattern across point types.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements a glyph editor for built-in vector font data, parsing glyph bytecode (move/line/curve opcodes) into editable structure with zero heap allocations and provides:
Canvas rendering pre-computes the coordinate transform origin once per draw function rather than per-point, and a fe_draw_point() helper eliminates the duplicated selection-check pattern across point types.
Summary by cubic
Adds an interactive vector font editor demo to the example app. Edit built‑in glyphs on a canvas with mouse/keyboard, with undo and zoom.
New Features
Migration
Written for commit 634276a. Summary will update on new commits.