Introduce editable text layers: a resizable text box with editable text, font size, color, font family, and alignment. Core: - New TextLayer/TextContent (text_layer.rs), wired into AnyLayer/LayerType and all the exhaustive match sites; structured so content can be keyframed later via content_at(). - fonts.rs: thread-local parley FontContext with three bundled fonts (Liberation Sans/Serif/Mono, SIL OFL), system-font enumeration consolidated to base families, document-embedded fonts, glyph/caret/selection geometry, and a background preloader for the picker fonts. - Rendering via parley layout + Scene::draw_glyphs (renderer.rs); text composites through the vector path. - Actions: CreateTextClipAction (vector-layer branch, undoable), SetTextContentAction, ResizeTextBoxAction. - .beam font embedding: MediaKind::Font rows (content-hash dedupe) written on save and registered on load, with bundled-default fallback. - VectorClip content bounds include text boxes so text-only clips are selectable/draggable. Editor: - Text tool: click empty/raster/video to create a top-level text layer, or a vector layer to create+enter a clip containing the text; click an existing box to edit it. - Hybrid in-place editing: a hidden egui TextEdit drives input/IME/caret while the text and caret/selection render in Vello; empty just-created layers are removed on commit. - Selection outline + 8 resize handles (re-wrap text) with hover cursors; factored the corner/edge resize-cursor mapping shared with the Transform tool. - Info panel: edit text, size, color, alignment, box size, and a font-family picker that previews each entry in its own font (fonts preloaded in the background to avoid hitches). Deps: add parley (git, pinned to match vello's peniko); bundle Liberation fonts under lightningbeam-core/assets/fonts. Gitignore the local .cargo/config.toml used to select a machine's ffmpeg. |
||
|---|---|---|
| .. | ||
| LiberationMono-Regular.ttf | ||
| LiberationSans-Regular.ttf | ||
| LiberationSerif-Regular.ttf | ||
| README.txt | ||
README.txt
Bundled fonts for Lightningbeam text layers =========================================== These are the Liberation fonts, used as the built-in serif / sans-serif / monospaced families so text renders deterministically without depending on system fonts: LiberationSans-Regular.ttf LiberationSerif-Regular.ttf LiberationMono-Regular.ttf License: SIL Open Font License, Version 1.1. Copyright (c) Red Hat, Inc., with Reserved Font Name "Liberation". Full license text: https://openfontlicense.org/ (also distributed with the Liberation fonts package as its OFL.txt / LICENSE).