Skip to content

Add font picker for the text mask - #11

Merged
Murphy23x merged 1 commit into
mainfrom
dev
Oct 11, 2026
Merged

Murphy23x merged 1 commit into
mainfrom
dev

Conversation

@Murphy23x

Copy link
Copy Markdown
Owner

Summary

The text mask can now use any font installed on the machine running the sketch, instead of the fixed SansSerif.bold.

  • New Font field in the Mask section of the Output tab (shown when the mask source is Text). It displays the current font in its own typeface.
  • Clicking it opens a scrollable list of every installed font (PFont.list()). You can type to filter it (each typed word must appear in the name, e.g. serif bold) and scroll with the mouse wheel or Up/Down. Click a font or press Enter to pick one; Esc or a click outside closes the list.
  • The list opens upward when there's more room above the field.
  • Changing the font regenerates only the layers that use the mask, like the other mask settings do.
  • The font is saved in presets (maskFont). If a preset names a font that isn't installed, the current font stays and the status bar says so. Older presets fall back to the default font.
  • README and header comment updated.

Testing

  • Built and ran it with Processing 4.4.0 under Xvfb. The picker listed 119 fonts. Filtering on bold and switching the mask to DejaVu Serif Bold rendered the masked layer in that font.
  • Note: Processing 4.4.0 refuses to build the existing genSubdivision because it uses var as a variable name. This PR doesn't touch that code, so for the test build I renamed it in a scratch copy only.

🤖 Generated with Claude Code

https://claude.ai/code/session_016b6iajxu7y5cCT1ug5YLKu


Generated by Claude Code

The text mask can now use any font installed on the system (PFont.list()).
A new Font field on the Output tab opens a scrollable list that filters as
you type; the chosen font is shown in its own typeface and saved in presets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016b6iajxu7y5cCT1ug5YLKu
@Murphy23x
Murphy23x merged commit 4230ab4 into main Oct 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants