Marey.Backend.Skia 0.7.0

dotnet add package Marey.Backend.Skia --version 0.7.0
                    
NuGet\Install-Package Marey.Backend.Skia -Version 0.7.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Marey.Backend.Skia" Version="0.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Marey.Backend.Skia" Version="0.7.0" />
                    
Directory.Packages.props
<PackageReference Include="Marey.Backend.Skia" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Marey.Backend.Skia --version 0.7.0
                    
#r "nuget: Marey.Backend.Skia, 0.7.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Marey.Backend.Skia@0.7.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Marey.Backend.Skia&version=0.7.0
                    
Install as a Cake Addin
#tool nuget:?package=Marey.Backend.Skia&version=0.7.0
                    
Install as a Cake Tool

Marey.Backend.Skia

The PNG and PDF backend for Marey, a dimensionally-typed visualization system for F#. netstandard2.1.

#r "nuget: Marey.Plot"
#r "nuget: Marey.Backend.Skia"

open Marey
open Marey.UnitsOfMeasure

let figure = Chart.line U.second U.metre t x

// Bytes, or straight to a file. `toFileBytes` rather than `toFile`: writing text has an
// encoding and writing bytes does not, and a PNG that picked up a byte-order mark on the way
// to disk would not open.
let png = figure |> Chart.render SkiaBackend.renderPng (Chart.size 800.0 500.0)
figure |> Chart.toFileBytes SkiaBackend.renderPdf "fall.pdf" (Chart.size 800.0 500.0)

The first backend that measures text

Marey.Core ships an approximate text measurer — a Helvetica advance-width table, no kerning, no ligatures — because a zero-dependency core cannot do better. This backend shapes with HarfBuzz and is the only one for which Capabilities.TextShaping is true.

The consequence is worth knowing before it looks like a bug: two backends of this library place an axis title at different coordinates for the same figure. Layout is a measure–arrange pass against ITextMeasurer, so a real measurer moves the gutters. At 12 px, AVATAR is 48.01 px estimated and 44.51 px shaped in Arial, and a real face reserves about a quarter more vertical room than the estimate. Both reach the panel rectangle.

Which font, and reproducibility

SVG names a family and lets the viewer resolve it. Skia has to pick a real face from what is installed, so the same figure is a slightly different PNG on two machines. That is reported rather than hidden — SkiaBackend.ResolvedFaces names, for every run in the scene, the entry in the theme's stack that matched and the family that was opened, with Matched = None meaning the whole stack missed and Skia's default was used.

For output that must be identical everywhere, SkiaOptions.FontFile states a font file and resolution is skipped.

Font fallback

A face holds the scripts it holds, and one face is not enough for a CJK axis title against a Latin theme. The measurer splits a run by coverage — per codepoint, the first face that has it, CSS font matching's rule — shapes each piece in its own face and sums the advances. ITextMeasurer is unchanged: it still answers a width, and a run one face covers is one piece.

It reports. ResolvedFace.Fallbacks names the faces that covered what the primary could not, with the codepoints each covered; ResolvedFace.Missing lists the codepoints nothing covered, which are drawn as .notdef. Both are empty for a Latin figure.

SkiaOptions.FontFiles states the whole chain and is the reproducible answer for a mixed-script figure. FontFile states one face and does not fall back — one face is the whole promise, and a codepoint it lacks is a reported box. Setting both is an error.

PDF

Vector, despite the package being the raster one: paths stay paths and glyphs stay glyphs. The page is the requested extent converted exactly — a 400 × 250 px figure is a 300 × 187.5 pt page — and the document carries no timestamp, so two renders of one figure are byte-identical. SkiaOptions.Pdf sets the title, author, subject and keywords.

Native assets

This is the one Marey package with third-party dependencies, and they include native libraries: SkiaSharp and SkiaSharp.HarfBuzz, with the Win32, macOS and Linux asset packages. On a slim Linux container libfontconfig1 and libfreetype6 have to be installed as well. If a native library is missing, the entry points raise a message naming the package to add rather than a DllNotFoundException naming a file.

Marey.Core, Marey.Units, Marey.Plot, Marey.Backend.Svg and Marey.Backend.Tikz have no dependency on this package or on SkiaSharp, and a test asserts it against the built assembly graph.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Marey.Backend.Skia:

Package Downloads
Marey.Backend.Gpu

GPU rendering for Marey: Skia on OpenGL, with batched marks drawn by the GPU directly. A figure, a film's frames or a million points, offscreen; fluid solvers and LIC on the GPU.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.0 99 10/17/2026
0.6.0 105 10/11/2026
0.5.0 103 10/10/2026
0.4.0 88 10/8/2026
0.3.1 95 10/5/2026
0.3.0 91 10/5/2026