Repository navigation
Conversation
People want marks that look different from AInotate's bold default, for example a calm hand-drawn style. Building each style into AInotate would add fonts and drawing code to every install. A plug-in point keeps AInotate small: a look lives in its own package and is used only where installed. render() now draws every mark through a Look object. The built-in look, the only one shipped, is the class `ainotate.render.Look`, which holds exactly the drawing calls render() made before (colors, label font and size, labels and text notes, outlines, step badges, arrows, highlights, the spotlight dim and corner, the redaction fill, the keycap font, the magnifier line width and the drop shadow). A package registers a subclass under the entry point group "ainotate.looks" and overrides what it changes. A look can change a redaction's color but never its area. The look is chosen by spec "look", then the env AINOTATE_LOOK, then `look` in config.toml (the same order as the output folder), then "default". `annotate` and `shoot` take --look, and the MCP annotate, preview and shoot tools take a `look` argument. An unknown name is a spec error (exit 2) that says where it came from and lists the installed looks. The default look is pixel-identical: a test pins the sha256 of a render of every mark type, light and dark, from before this change (Pillow 12.3.0 / FreeType 2.14.3; other versions skip the pin). Other tests register a fake look, check that it draws the marks and is picked by the flag, the env and the config file, and check the unknown-look error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ls per platform A look that is installed but fails to import, is not a Look subclass, or fails to start now renders with the built-in look and adds a warning instead of failing the render. The pixel pin of the default look depends on system fonts, so it is kept per platform (the macOS pin matches main before the hook: the default render is unchanged). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
visul
added a commit
that referenced
this pull request
Oct 10, 2026
#6) Rebases testy-cool's #5 onto main: the look hook from #4 is replaced by this version, which also recovers when a look fails mid-draw. Default renders stay pixel-identical (per-platform pins kept from #4; golden tests pass on macOS). Co-authored-by: testy-cool <202153476+testy-cool@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Implements option 1 from #3: a small
ainotate.looksentry point, so a separate package can supply a look (for example the soft "neat" look) while the built-in look stays the default.look-hookbranch, rebased on main, authorship kept.Looksubclass or fails to start renders with the built-in look plus a warning, instead of failing the render. It also pins the default-look pixels per platform: fonts come from the system, so the Linux pin from the contributor and a macOS pin made on main before this change both hold. The macOS pin confirms the default render is pixel-identical.How a look is picked:
"look"in the spec,--look, the MCPlookargument,AINOTATE_LOOK, orlookin config.toml. An unknown name is a spec error that lists the installed looks.Tests: 593 passed locally (web tests excluded), including 9 in tests/test_looks.py. All files stay under 500 lines (render.py 475).
Closes #3
🤖 Generated with Claude Code