SixLabors.Fonts
1.0.0-beta16
Prefix Reserved
See the version list below for details.
dotnet add package SixLabors.Fonts --version 1.0.0-beta16
NuGet\Install-Package SixLabors.Fonts -Version 1.0.0-beta16
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-beta16" />
paket add SixLabors.Fonts --version 1.0.0-beta16
#r "nuget: SixLabors.Fonts, 1.0.0-beta16"
// Install SixLabors.Fonts as a Cake Addin #addin nuget:?package=SixLabors.Fonts&version=1.0.0-beta16&prerelease // Install SixLabors.Fonts as a Cake Tool #tool nuget:?package=SixLabors.Fonts&version=1.0.0-beta16&prerelease
<h1 align="center">
<img src="https://raw.githubusercontent.com/SixLabors/Branding/master/icons/fonts/sixlabors.fonts.512.png" alt="SixLabors.Fonts" width="256"/> <br/> SixLabors.Fonts </h1>
<div align="center">
</div>
SixLabors.Fonts is a new cross-platform font loading and drawing library.
License
- Fonts is licensed under the Apache License, Version 2.0
- An alternative Commercial Support License can be purchased for projects and applications requiring support. Please visit https://sixlabors.com/pricing for details.
Support Six Labors
Support the efforts of the development of the Six Labors projects.
- Purchase a Commercial Support License ❤️
- Become a sponsor via GitHub Sponsors ❤️
- Become a sponsor via Open Collective ❤️
Documentation
- Detailed documentation for the Fonts API is available. This includes additional conceptual documentation to help you get started.
- Our Samples Repository is also available containing buildable code samples demonstrating common activities.
Questions
- Do you have questions? We are happy to help! Please join our Discussions Forum.
- Please read our Contribution Guide before opening issues or pull requests!
Code of Conduct
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct.
Installation
Install stable releases via Nuget; development releases are available via MyGet.
Package Name | Release (NuGet) | Nightly (MyGet) |
---|---|---|
SixLabors.Fonts |
Manual build
If you prefer, you can compile Fonts yourself (please do and help!)
- Using Visual Studio 2019
- Make sure you have the latest version installed
- Make sure you have the .NET Core 3.1 SDK installed
Alternatively, you can work from command line and/or with a lightweight editor on both Linux/Unix and Windows:
To clone Fonts locally, click the "Clone in [YOUR_OS]" button above or run the following git commands:
git clone https://github.com/SixLabors/Fonts
If working with Windows please ensure that you have enabled log file paths in git (run as Administrator).
git config --system core.longpaths true
Submodules
This repository contains git submodules. To add the submodules to the project, navigate to the repository root and type:
git submodule update --init --recursive
Features
- Reading font description (name, family, subname etc plus other string metadata).
- Loading True type fonts.
- Loading WOFF fonts.
- Loading WOFF2 fonts.
- Load all compatible fonts from local machine store.
- Support for rendering left to right, right to left and bidirectional text.
- Support for ligatures.
- Support for advanced OpenType features glyph substitution (GSUB) and glyph positioning (GPOS)
Limitations
We currently only support otf and woff/woff2 fonts with True Type outlines.
API Examples
Read font description
FontDescription description = null;
using(var fs = File.OpenRead("Font.ttf")){
description = FontDescription.Load(fs); // once it has loaded the data the stream is no longer required and can be disposed of
}
string name = description.FontName(CultureInfo.InvariantCulture);
Populating a font collection
FontCollection fonts = new FontCollection();
FontFamily font1 = fonts.Add("./path/to/font1.ttf");
FontFamily font2 = fonts.Add("./path/to/font2.woff");
How can you help?
Please... Spread the word, contribute algorithms, submit performance improvements, unit tests.
Projects using SixLabors.Fonts
- SixLabors.ImageSharp - cross platform, fully managed, image manipulation and drawing library.
The SixLabors.Fonts Team
Product | Versions 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- No dependencies.
-
.NETStandard 2.0
- System.Buffers (>= 4.5.1)
- System.IO.Compression (>= 4.3.0)
- System.IO.UnmanagedMemoryStream (>= 4.3.0)
- System.Memory (>= 4.5.4)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 4.7.0)
- System.Threading.Tasks.Parallel (>= 4.3.0)
- System.ValueTuple (>= 4.5.0)
-
.NETStandard 2.1
- System.IO.Compression (>= 4.3.0)
- System.IO.UnmanagedMemoryStream (>= 4.3.0)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 4.7.0)
- System.Threading.Tasks.Parallel (>= 4.3.0)
- System.ValueTuple (>= 4.5.0)
NuGet packages (86)
Showing the top 5 NuGet packages that depend on SixLabors.Fonts:
Package | Downloads |
---|---|
ClosedXML
See release notes https://github.com/ClosedXML/ClosedXML/releases/tag/0.104.2 ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API. |
|
NPOI
.NET port of Apache POI |
|
SixLabors.ImageSharp.Drawing
An extension to ImageSharp that allows the drawing of images, paths, and text. |
|
PdfSharpCore
PdfSharp for .NET Core PdfSharpCore is a partial port of PdfSharp.Xamarin for .NET Core Additionally MigraDoc has been ported as well (from version 1.32). Images have been implemented with ImageSharp from https://www.nuget.org/packages/SixLabors.ImageSharp |
|
SixLabors.Shapes.Text
Allows generating glyphs for text and a fonts for manipulation using SixLabors.Shapes |
GitHub repositories (25)
Showing the top 5 popular GitHub repositories that depend on SixLabors.Fonts:
Repository | Stars |
---|---|
nissl-lab/npoi
a .NET library that can read/write Office formats without Microsoft Office installed. No COM+, no interop.
|
|
ClosedXML/ClosedXML
ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API.
|
|
cyanfish/naps2
Scan documents to PDF and more, as simply as possible.
|
|
peachpiecompiler/peachpie
PeachPie - the PHP compiler and runtime for .NET and .NET Core
|
|
Webreaper/Damselfly
Damselfly is a server-based Photograph Management app. The goal of Damselfly is to index an extremely large collection of images, and allow easy search and retrieval of those images, using metadata such as the IPTC keyword tags, as well as the folder and file names. Damselfly includes support for object/face detection.
|
Version | Downloads | Last updated |
---|---|---|
2.0.6 | 29,158 | 10/30/2024 |
2.0.5 | 324 | 10/30/2024 |
2.0.4 | 879,521 | 6/29/2024 |
2.0.3 | 939,324 | 3/28/2024 |
2.0.2 | 206,245 | 2/15/2024 |
2.0.1 | 1,147,760 | 12/1/2023 |
2.0.0 | 1,416,199 | 9/15/2023 |
1.0.1 | 3,327,927 | 9/15/2023 |
1.0.0 | 18,291,196 | 8/11/2023 |
1.0.0-beta19 | 6,509,908 | 10/30/2022 |
1.0.0-beta18 | 15,781,614 | 7/22/2022 |
1.0.0-beta17 | 7,911,867 | 5/18/2022 |
1.0.0-beta16 | 3,167,083 | 2/9/2022 |
1.0.0-beta15 | 1,334,737 | 5/20/2021 |
1.0.0-beta0013 | 7,764,354 | 6/18/2020 |
1.0.0-beta0012 | 65,981 | 6/8/2020 |
1.0.0-beta0011 | 347,129 | 5/13/2020 |
1.0.0-beta0009 | 2,064,823 | 9/1/2019 |
1.0.0-beta0008 | 1,090,820 | 1/25/2019 |
1.0.0-beta0007 | 781,779 | 8/5/2018 |
1.0.0-beta0006 | 8,310 | 6/7/2018 |
1.0.0-beta0005 | 2,926,893 | 5/24/2018 |
1.0.0-beta0004 | 3,605 | 3/27/2018 |
1.0.0-beta0003 | 143,254 | 11/17/2017 |
1.0.0-beta0002 | 15,901 | 9/16/2017 |
1.0.0-beta0001 | 27,837 | 9/13/2017 |
0.1.0-alpha0016 | 14,505 | 7/16/2017 |
0.1.0-alpha0015 | 1,175 | 6/22/2017 |
0.1.0-alpha0014 | 73,884 | 6/13/2017 |
0.1.0-alpha0013 | 11,422 | 6/6/2017 |
0.1.0-alpha0012 | 1,185 | 6/4/2017 |
0.1.0-alpha0011 | 243,900 | 5/30/2017 |
0.1.0-alpha0010 | 27,119 | 5/2/2017 |
0.1.0-alpha0009 | 1,132 | 4/21/2017 |
0.1.0-alpha0008 | 2,337 | 4/17/2017 |
0.1.0-alpha0007 | 1,173 | 4/16/2017 |
0.1.0-alpha0006 | 1,204 | 4/13/2017 |
0.1.0-alpha0005 | 1,316 | 4/12/2017 |
0.1.0-alpha0004 | 1,227 | 4/12/2017 |
0.1.0-alpha0003 | 1,149 | 4/12/2017 |
0.1.0-alpha0002 | 20,994 | 3/12/2017 |
0.1.0-alpha0001 | 1,322 | 3/5/2017 |