SixLabors.Fonts is a new cross-platform font loadings and drawing library.
Pre-release downloads
At present the code is pre-release we have initial pre-releases availible on nuget.
We also have a MyGet package repository - for bleeding-edge / development NuGet releases.
If you prefer, you can compile SixLabors.Shapes yourself (please do and help!), you'll need:
- Visual Studio 2017
- The .NET Core 1.0 SDK Installer - Non VSCode link.
To clone it locally click the "Clone in Windows" button above or run the following git commands.
git clone https://github.com/SixLabors/Fonts.git
- 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)
we currently only support otf and woff fonts with True Type outlines.
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;
FontCollection fonts = new FontCollection();
FontFamily font1 = fonts.Install("./path/to/font1.ttf");
FontFamily font2 = fonts.Install("./path/to/font2.woff");
Please... Spread the word, contribute algorithms, submit performance improvements, unit tests.
- SixLabors.ImageSharp - cross platform, fully managed, image manipulation and drawing library.
Lead
Core Team