makepad/widgets/families/rich_text
Admin 53e0e85b92 draw and widgets: Slug text everywhere, no blank glyphs, slimmer widgets
All outline text draws with Slug curves on every platform (SDF/MSDF stays
selectable per size); a frame never presents a blank glyph and retained draw
lists keep theirs. One coverage model for vector feathering, widget families
split out of the core crate, fewer steady-state allocations, video keeps its
aspect (Contain/Cover), render and SSAO pass unification.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 12:26:21 +02:00
..
src draw and widgets: Slug text everywhere, no blank glyphs, slimmer widgets 2026-10-13 12:26:21 +02:00
Cargo.toml rich_text: Markdown draws its inline images instead of an "Image[name: ...]" placeholder -- ![alt](src) now draws the picture through an inline_image Image item, loaded by the shared draw image cache and its existing paths: local paths and file:// URLs decode off the UI thread, data: URLs (base64 or percent-encoded) decode from their bytes, http(s) URLs go through the platform HTTP stack, and an SVG (a data: URL or a .svg file) is parsed by the Image widget's vector path. The picture is its natural size (a texel per point) scaled down to the text column; until it has loaded, and when it cannot load, its alt text stands in for it, and the Markdown relayouts when the decode lands. Network fetches are opt-in through the new load_http_images property (off by default) so an untrusted body makes no requests, and a restricted Splash loads no images at all, as it already emits no link URLs. Each image widget requests its source once; the cache already keeps textures across widget recreation. This replaces the original PR's own 1.3k-line pipeline (its private base64 decoder, per-widget then Cx-global LRU cache, negative cache and HTTP plumbing) with about 200 lines over the existing cache; not taken: its negative cache (a failed URL is requested again only when a new widget shows it) and SVG over HTTP. Checked on the Linux node (Vulkan, hidden --remote instance, grab): a local PNG, a 3000 px file:// PNG scaled to the column, a base64 PNG, a percent-encoded SVG, an SVG file and an HTTP PNG all draw inline; a missing file and an HTTP image with load_http_images off show their alt text; one HTTP request in total and the app idles at 0 % CPU afterwards. 2026-09-29 01:55:15 +02:00