Skip to content

woutware/Fonts

 
 

Repository files navigation

SixLabors.Fonts
SixLabors.Fonts

Build status codecov GitHub license

Join the chat at https://gitter.im/SixLabors/Shapes GitHub issues GitHub stars GitHub forks

SixLabors.Fonts is a new cross-platform font loadings and drawing library.

Installation

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.

Manual build

If you prefer, you can compile SixLabors.Shapes yourself (please do and help!), you'll need:

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

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;

Popluating 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

The SixLabors.Fonts Team

Lead

Core Team

About

📰 Font loading and drawing library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 98.8%
  • Other 1.2%