SixLabors / Fonts
Projects that are alternatives of or similar to Fonts
SixLabors.Fonts
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 License can be purchased for projects and applications requiring support. Please visit https://sixlabors.com/pricing for details.
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
- Load all compatible fonts from local machine store (windows only at the moment)
Limitations
we currently only support otf and woff fonts with True Type outlines.
API Examples
Read font description
FontDescription description = null;
using(var fs = File.OpenReader("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;
Populating a font collection
FontCollection fonts = new FontCollection();
FontFamily font1 = fonts.Install("./path/to/font1.ttf");
FontFamily font2 = fonts.Install("./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
Sponsor Six Labors
Support the efforts of the development of the Six Labors projects. [Become a sponsor ❤️]
Platinum Sponsors
Become a platinum sponsor with a monthly donation of $2000 (providing 32 hours of maintenance and development) and get 2 hours of dedicated support (remote support available through chat or screen-sharing) per month.
In addition you get your logo (large) on our README on GitHub and the home page (large) of sixlabors.com
Gold Sponsors
Become a gold sponsor with a monthly donation of $1000 (providing 16 hours of maintenance and development) and get 1 hour of dedicated support (remote support available through chat or screen-sharing) per month.
In addition you get your logo (large) on our README on GitHub and the home page (medium) of sixlabors.com
Silver Sponsors
Become a silver sponsor with a monthly donation of $500 (providing 8 hours of maintenance and development) and get your logo (medium) on our README on GitHub and the product pages of sixlabors.com
Bronze Sponsors
Become a bronze sponsor with a monthly donation of $100 and get your logo (small) on our README on GitHub.