High Quality .NET Font Manipulation API for TTF, OTF, and More Fonts

Enhance your font file management solutions with the capabilities of our API. Integrate font conversion and merging features with ease in your .NET apps.

Download Free TrialView All APIs

Font Management Toolkit for .NET Applications

Aspose.Font for .NET is a flexible API to load, manage, and convert different types of fonts. Developers can use the API to read, merge, and convert TrueType (TTF), OpenType (OTF), CFF, WOFF, EOT, and Type1 fonts with ease within the .NET font manipulation solutions. Our API offers comprehensive abilities that include effortless font loading and advanced manipulation to enhance the typographic capabilities of your applications. The API simplifies the complexities of handling fonts, allowing you to focus on providing exceptional user experiences.

The .NET font manipulation API allows end users to load font files from multiple sources, read font information related to glyphs and metrics, detect Latin symbols, render text using custom interfaces and font glyphs, extract embedded licensing information, generate font subsets, and save modified font files. Our API also supports converting fonts from one type to another, including OTF to TTF, Type1 to SVG, TTF to WOFF, and many more. You can use the .NET API to merge several TrueType fonts in the .NET font management and typography applications. Aspose.Font for .NET is your one-stop shop for all font management, conversion, and manipulation needs.

Getting Started

Before setting up the .NET library for font manipulation, please visit the System Requirements page. This page provides information on the recommended framework, operating system, and development environment settings. Please ensure your system complies with the requirements outlined on this page to experience optimized API usage.

Aspose.Font for .NET Installation

Please visit the downloads section to download and install the library using the MSI installer or the DLLs. You can also use the NuGet package to set up the .NET font management library. The command for the Visual Studio package manager console is shared below:

PM > Install-Package Aspose.Font

Master Font Conversion and Detect Latin Symbols in Type1 Fonts using C#

Aspose.Font for .NET includes easy-to-use features that developers can utilize in their font converter applications to convert various fonts. Our API covers many common font conversion use cases that enable developers to convert between OpenType, TrueType, Type1, CFF, WOFF, and other fonts. Similarly, the .NET font manipulation API supports detecting Latin symbols in TrueType and Type1 fonts. We will review both of these features with the help of C# code examples in this section.

Convert TTF to WOFF in .NET

You can build TTF to WOFF converter applications in C# using the .NET font management library. Please check the following example coding and information for more.

// Learn to convert TTF to WOFF fonts.
// TTF file path
string fontPath = @"D:\Files\font\Montserrat-Regular.ttf";

// Load the Font file
FileSystemStreamSource source = new FileSystemStreamSource(fontPath);

// Create font file definition
FontFileDefinition fileDefinition = new FontFileDefinition(source);

// Create font definition
FontDefinition fontDefinition = new FontDefinition(FontType.TTF, fileDefinition);

// Open font
Font font = Font.Open(fontDefinition);

// WOFF output path
string outPath = @"D:\Files\font\TtfToWoff_out1.woff";
FileStream outStream = File.Create(outPath);
// Convert TTF to WOFF
font.SaveToFormat(outStream, FontSavingFormats.WOFF);

Detect Latin Symbols in Type1 Fonts in C#

Users can check if Latin symbols are supported in a specific Type1 font with the help of our library. The following steps, information, and code example will help you learn more.

  • Load the font file using the FontFileDefinition class.
  • Initialize the FontDefinition class object with FontType (Type1) and FontFileDefinition object as arguments.
  • Call the Font.Open() method with the FontDefinition object as an argument and initialize the Type1Font class object.
  • Iterate through the different codes and decode them into Glyph IDs.
  • Check the glyph IDs for the support of Latin symbols.
 // This code example showcases detecting if a particular Type1 font supports Latin symbols or not.
// Type1 font file path
string fontPath = @"D:\Files\font\courier.pfb";

// Load the font file
FontFileDefinition fontFileDefinition = new FontFileDefinition("pfb", new FileSystemStreamSource(fontPath));

// Font definition object
FontDefinition fd = new FontDefinition(FontType.Type1, fontFileDefinition);

// Open the font
Type1Font font = (Type1Font)Font.Open(fd);

var latinText = true;

// Check for the support of latin symbols
for (uint code = 65; code < 123; code++)
{
    GlyphId gid = font.Encoding.DecodeToGid(code);
    if (gid == null || gid == GlyphUInt32Id.NotDefId)
    {
        latinText = false;
    }
}

if (latinText)
{
    Console.WriteLine("Font {0} supports latin symbols.", font.FontName);
}
else
{
    Console.WriteLine("Latin symbols are not supported by font {0}.", font.FontName);
}

You can find more complete code examples of the Aspose.Font for .NET API on the GitHub examples page. We offer Free Online Font Manipulation Apps that help you view and convert fonts from anywhere using your mobile devices. If you want to manipulate font files on the fly, please check out our free apps today.

Font Manipulation Made Easy for .NET Developers

Aspose.Font for .NET offers unmatched cross-platform compatibility for developers to build applications targeting multiple frameworks and interfaces. Our API works well across operating systems and helps users develop code using their favorite development environment. The extended framework compatibility of the API makes integration with existing typography and font manipulation apps straightforward. The high quality .NET font manipulation API helps you independently manage fonts in your web or desktop solutions without setting up third-party software and simplifies the whole process.

FAQ

1. How can I read, convert, and save font files in .NET?

The Aspose.Font for .NET library can help you load, merge, and convert font files in your .NET applications. It supports well-known font types, including Type1, TTF, OTF, WOFF, CFF, and more, and provides many font management features for .NET developers to integrate into their solutions.

2. How long it takes to convert and save font files using the API?

Our API works fast and completes your font loading, reading, merging, and conversion requests in no time.

3. Are code examples available for developers to help learn about font manipulation using the .NET API?

Yes, we provide coding examples for developers to help them with the initial learning curve. These code samples are available on the GitHub examples page of the .NET font manipulation API and cover various use cases for the API users.

4. Is the API secure for sensitive documents and data?

Yes, our API is secure for sensitive data. We ensure the safety and integrity of your data and take all necessary measures to protect your files processed using our products.

5. Is Aspose.Font for .NET compatible with different .NET frameworks?

Absolutely! The .NET library for font manipulation is compatible with multiple .NET frameworks and runs smoothly on various operating systems. It does not require additional software installations to manage font files.

Looking for help?

Checkout our support channels for help with your questions related to Aspose product API features and working.

Ready to get started?

Download Free Trial View All APIs