Skip to content

Use FreeType for Nano Server font support.#4280

Open
jeffska wants to merge 3 commits into
mono:mainfrom
jeffska:nano-freetype
Open

Use FreeType for Nano Server font support.#4280
jeffska wants to merge 3 commits into
mono:mainfrom
jeffska:nano-freetype

Conversation

@jeffska

@jeffska jeffska commented Jun 29, 2026

Copy link
Copy Markdown

Description of Change

Enable FreeType when building Nano Server native libraries to get around the lack of DirectWrite.

No tests since there don't appear to be any Nano Server-specific tests.

Bugs Fixed

  • Fixes #

#1105

API Changes

None.

Behavioral Changes

None.

Text drawing now operates correctly for Nano Server in cases where fonts are loaded externally.

Required skia PR

mono/skia#272

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Merged related skia PRs
  • Changes adhere to coding standard
  • Updated documentation

@github-actions

Copy link
Copy Markdown
Contributor

📦 Try the packages from this PR

Warning

Do not run these scripts without first reviewing the code in this PR.

Step 1 — Download the packages

bash / macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 4280

PowerShell / Windows:

iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 4280"

Step 2 — Add the local NuGet source

dotnet nuget add source ~/.skiasharp/hives/pr-4280/packages --name skiasharp-pr-4280
More options
Option Description
--successful-only / -SuccessfulOnly Only use successful builds
--force / -Force Overwrite previously downloaded packages
--list / -List List available artifacts without downloading
--build-id ID / -BuildId ID Download from a specific build

Or download manually from Azure Pipelines — look for the nuget artifact on the build for this PR.

Remove the source when you're done:

dotnet nuget remove source skiasharp-pr-4280

@mattleibow

Copy link
Copy Markdown
Contributor

@jeffska are you using Nano Server? I did not think anyone was. Are you able to share if you are using Nano for a reason as opposed to Linux?

Also, thanks for the PR, could you rebase?

@jeffska

jeffska commented Jul 1, 2026

Copy link
Copy Markdown
Author

@mattleibow We're not currently using Nano Server, with one of the primary reasons being that text rendering doesn't currently work. We use both Linux and Windows containers (customer option), so being able to support Nano vs. Server Core would be nice from a container size perspective.

Because of other non-Nano-compatible dependencies, we might not actually be able to actually build w/ Nano. A lot of my motivation with this is to get a FreeType-enabled build for Windows. First, to get around the performance issue I found w/ PDFs (#3906). Second is to get just that little bit of extra consistency for font rendering between Linux and Windows. And it's likely useful for others who need Nano support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants