onerenderDocs
onerender docs
Everything about OneRender: getting started, HTML to PDF and images, Razor, fonts and text, interactive pages and game hosts, rendered facts for accessibility checks, how it is checked against Chrome, and the reference.
Start
Getting startedInstall OneRender for .NET 10, render an HTML invoice to a PNG and to a tagged PDF without a browser, supply its style sheet and images from your own code, read the diagnostics, and query the layout.OverviewAn HTML and CSS layout and rendering engine for .NET, written from the specifications. HTML in (or a styled tree built in C#), pixels, a tagged PDF, or a retained display list out. The same engine lays out a 200-page report and a game UI that updates every frame. It has no…
PDF and images
PDF outputThe backend turns the retained display list (display-list.md, format 1.2) into a PDF with OnePdf core's writer. It never reaches back into layout: everything it knows is in the list. Fonts, images and the structure tree come from the list items and their ids.Razor componentsRecursiveAI.OneRender.Razor renders a Razor component to a tagged PDF or to pixels in one call. It runs the component on .NET's HtmlRenderer, serves the document's style sheets, images and fonts from the app's web root and static web assets, and passes the markup to…Fonts and textThe service inline layout calls to turn computed font properties and text into shaped glyphs. It is independent of the box and fragment trees; layout reaches it through IFontProvider (OneRender.Layout), and TextFontProvider is the engine's implementation. OneFont does the…Layout conventionsPlaces where the specifications leave room, or where the engine follows what Chrome does and the specification text is looser. Each entry says what is done, the spec text it rests on, and the evidence. A port can reproduce flow layout from these notes and the specifications.
Interactive pages and games
Game hostsA game engine that draws the display list with its own GPU renderer owns three things: the loop, the drawing, and the caches behind the drawing (glyph atlases, image textures, rasterized SVG). The engine owns layout, style, input handling and the list. This page is the whole…The display listThe display list is what the painter produces and every backend consumes: a flat, ordered, retained list of paint items for one frame or page. This document is the format. A backend (the image rasterizer, the PDF writer, a game engine's GPU renderer) can be built from it…Forms and text editingForm controls are laid out and painted the way Chrome 156 does by default, so boxes and pixels agree with it on the same fonts. This page is the normative record: every number below was measured on Chrome 156 with Liberation Sans standing in for Arial (the same font files on…Transitions and animationsNormative notes for the behavior in Animation/ where the specifications leave room or the engine differs. The tests and the WPT replay are named in architecture.md.
How it is checked
Geometry against ChromeScreen layout is checked against Chrome: for every page of a corpus set, every element's border box as Chrome lays it out is compared with the box our engine gives the same element. This document says what is measured, how, and how to reproduce it. The tooling is…Web Platform Teststools/OneRender.WptRunner runs the web-platform-tests reftests of the modules listed in tools/wpt/modules.json and records per-module pass rates. Layout and paint work is gated on those rates. The runner talks to the engine through one seam…Pixel similarityInformation only: no gate depends on it. It shows how close our pixels are to Chrome's on the pages the geometry differential uses, and where they differ most. The tool is the pixels command of tools/geomdiff (Pixels.cs, Ssim.cs), run per set by…BenchmarksThe interactive bar, measured on a 1,000-node game-UI page (testdata/game-ui/hud.html, 1280×720):
Reference
ArchitectureThis page describes the front half of the pipeline as built: the styled-node tree, computed values, the box tree and the fragment tree. Layout algorithms, paint and the display list build on it.Docs mapNormative descriptions of how the engine behaves where the specifications leave room, and of its public formats. Start with the README for what the packages are and how to call them.ChangelogAll notable changes are listed here. The format follows Keep a Changelog and versions follow Semantic Versioning.