Font is the set of graphical representations of symbols. The way a font looks depends on the font’s parameters such as type family, typeface, font proportions, etc. Working with fonts is important in interface development, design, or typography. How will your interface look depends on the font you choose, but also there are a lot of factors you need to take to stop on the right font. Not only do users pay attention to the readability of the texts but also search engines take them into account when forming search results.

Aspose.Font for .NET is a flexible and easy-to-use library to work with different font files. This API supports multiple font formats like TrueType, CFF, OpenType, EOT, WOFF, WOFF2, and Type1. It allows you to load fonts and provides their data structure information along with any glyph, encoding information for all the font types. End-users can get help through its rendering subsystem to render any desired glyph or text.

Advanced .NET Font API Features

Load, Extract and Save TrueType Font

Aspose.Font for .NET can easily load, extract and save different font formats. Here is just few lines of code for TrueType TTF.

Load, Extract and Save TTF - C#

    //byte array to load Font from
    byte[] fontMemoryData = File.ReadAllBytes("directoryPath" + "Montserrat-Regular.ttf");
    FontDefinition fd = new FontDefinition(FontType.TTF, new FontFileDefinition("ttf", new ByteContentStreamSource(fontMemoryData)));
    TtfFont ttfFont = Aspose.Font.Font.Open(fd) as TtfFont;

    //Work with data from just loaded TtfFont object
    
    //Save CffFont to disk
    ttfFont.Save("ouputDirectoryPath"+Montserrat-Regular_out.ttf);
  

Support and Learning Resources

  
  

Aspose.Font offers individual APIs for popular development environments as listed below: