Use FreeType for Nano Server font support.#4280
Conversation
📦 Try the packages from this PRWarning 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 -- 4280PowerShell / 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-4280More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-4280 |
|
@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? |
|
@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. |
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
#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