Install the package that matches the layer you need.
dotnet add package Pretext
Then import the core namespace:
using Pretext;
The core package is enough when you want to:
The core Pretext package targets:
netstandard2.0net461net6.0net8.0net10.0dotnet add package Pretext.Uno
Pretext.Uno depends on Pretext, so the core engine is brought in transitively. The companion package itself remains net10.0-desktop. Import the core namespace and whichever companion namespaces you want:
using Pretext;
using Pretext.Uno.Controls;
using Pretext.Uno.Layout;
Use the companion package when you want the reusable Uno-side helpers from this repository:
StretchScrollHostUiRenderSchedulerPreparedTextMetricsColumnFlowLayoutObstacleLayoutHelperEvery preparation entry point accepts a font string. Pretext parses a CSS-like subset:
px, for example 16px700 16px Interitalic or obliqueExamples:
"16px Inter"
"italic 16px Georgia"
"700 18px \"IBM Plex Sans\""
"600 15px system-ui"
Line height is not read from the font string. Pass it separately to Layout or LayoutWithLines.
dotnet build PretextSamples.slnx
dotnet test tests/Pretext.Uno.Tests/Pretext.Uno.Tests.csproj
dotnet pack src/Pretext/Pretext.csproj -c Release
dotnet pack src/Pretext.Uno/Pretext.Uno.csproj -c Release
The interactive demos live in samples/PretextSamples. Use that app when you want to see how the library behaves in real layouts before integrating it into your own UI.