Skip to content

gui_toolkit 0.371.0

Choose a tag to compare

@sachahjkl sachahjkl released this 30 Nov 20:25
· 175 commits to master since this release
v0.371.0
4dd8933

Added

  • A diagram's theme of its own: the setting Appearance › Diagrams draws every Mermaid diagram as the program, or in a theme of its own (light, dark, neutral, forest) on that theme's background, so a light diagram in a dark program stays readable. A diagram viewer can offer the same choice for the diagram it shows (markdown.diagram_theme_dropdown).
  • svg reads style sheets: the rules of a drawing's <style> (tags, #id, .class, descendants and children, !important), hsl() colours, and a line of words written as tspans in a tspan, placed in em.
  • render.Frame_Stats, render.frame_stats, render.gpu_timestamps_supported and tk render_bench: expose per-frame instance counts, draw calls and upload bytes on both backends, guard WebGPU timestamp queries when an adapter lacks the feature, and benchmark fixed showcase and synthetic scenes headless at 1x and 2x.
  • Paper Mono default monospace font and OpenType feature picker: Paper Mono replaces Inconsolata as the embedded default monospace face (font.FALLBACK_MONO_DATA) with font.PAPER_MONO_DEFAULT_FEATURES enabled by default (single-story a, slashed zero, duospace glyphs, narrow space, and small arrows on; coding ligatures ss01 off) and variable-weight bold via font.styled_face. Adds OpenType feature discovery and formatting (font.face_features, with_features, features_parse, features_format, default_features), a wider wrapping font picker with a live hover detail card (origin, weight count or range, two-line specimen, and available feature count), a companion Features (N) popover (ui.font_features_button) with grouped toggles, live per-feature samples, and a Defaults reset, live feature application (ui.use_text_features), and the appearance.text.mono_features standard preference in gt:prefs_page.
  • Binary cache for the development shell: nix develop downloads what the CI already built from https://cache.froment.software.

Changed

  • mermaid.diagram and markdown.Diagram_Layout take Mermaid's theme by name: mermaid.diagram(text, theme = "dark") and proc(text, theme: string) instead of dark: bool; diagram_of takes the theme of a viewer's own.
  • Mermaid diagrams are laid out as Mermaid lays them out: the toolkit draws them with merman, Mermaid's own parser and layouts in Rust. Subgraphs inside subgraphs no longer overlap, the drawing is no longer cut at its top, and every kind of diagram Mermaid knows is drawn. The text of a diagram in Markdown is now as large as the text around it.
  • Mermaid diagrams in Markdown keep the text's size: a diagram wider than its column scrolls sideways, as a wide table does, instead of shrinking until its words cannot be read.
  • Incremental instance buffer upload: track the bytes last uploaded per instance page and write only changed instance ranges to the GPU on both WebGPU and Direct3D 11.
  • Opaque shapes hide what is under them on the GPU. A window draws its opaque plain shapes front to back with a depth test before the rest, so covered pixels are skipped and the picture stays the same. Its first frames draw without the pass until the pre-warming thread has made its pipelines: no frame waits for a compile. A window drawn by WebGPU on Windows has no depth pass: there, Direct3D 12 compiled each pipeline for seconds and held the device meanwhile. An offscreen renderer uses it only when asked (render.set_depth_pass).
  • Large rounded and bordered rectangles: split uniform-color rounded and bordered rectangles above 4096 interior pixels into thin edge/corner strips and a plain interior quad without per-pixel distance math (omitting the empty interior of bordered rectangles).
  • Large blurs (draw.filter_blur, draw.backdrop, draw.filter_drop_shadow): blurs with standard deviation at or above render.set_blur_sigma_limit (8 px by default) now use a 2-level Dual Kawase pyramid on a reduced working scale instead of a wide separable Gaussian, cutting texture fetches by 3.4x to 14.5x and pixels written by 1.8x to 4.7x at 1080p while keeping exact separable Gaussian for small radii.
  • Small text drawn from a cache. Screen-aligned text up to 48 px in Slug mode (the Linux and macOS default) is rasterised once into the glyph atlas, in grey and per colour stripe, and drawn with no curve work per pixel. Misses beyond a per-frame budget fall back to Slug; large, zoomed, rotated or animated text stays Slug. On Windows through WebGPU, text per colour stripe stays Slug: the atlas per colour stripe draws nothing on Direct3D 12 there.
  • Direct3D 11 partial presentation: switched swap chains from FLIP_DISCARD to FLIP_SEQUENTIAL, copying only dirty rectangles to the back buffer and passing them to IDXGISwapChain1::Present1 when flip-model rules allow (full-frame on first present, after resize or SetSourceSize, and with tearing); added render.present_damage_last.

Removed

  • Windows CPU first-frame stage. Removed the Direct3D 11 / WARP CPU first-frame stage (cpu_stage_d3d.odin) and GDI fallback: Direct3D 11 already ships precompiled shaders, so the CPU stage stays Linux-only.

Fixed

  • Input-to-screen latency and Wayland input pacing: render.pace_frame now waits via wait_frame_slot so Windows waits pump and timestamp input and WebGPU avoids acquiring a swap chain image before the JIT sleep; gt:host now paces continuous input on Wayland Mailbox surfaces instead of bypassing host_pace, and feeds Event.stamp, frame-read time and continuous-run state so render.latency_summary and missed-refresh counters report real numbers.