Skip to content

A Beef library for reading and writing AngelCode bitmap fonts in binary, XML, and text.

License

Notifications You must be signed in to change notification settings

disarray2077/BeefFNT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BeefFNT

Introduction

BeefFNT is a Beef library for reading and writing AngelCode bitmap fonts (.fnt) in binary, XML, and text. This library is a port of SharpFNT, with adjustments to make it work better in Beef.

Dependencies

This library depends on Xml-Beef for reading/writing Xml.

Example

The following loads a bitmap font from a file, outputs the name of the font, changes the font name, and then saves it as a new binary bitmap font.

using BeefFNT;

if (BitmapFont.FromFile("ExampleFont.fnt") case .Ok(let bitmapFont))
{
  defer delete bitmapFont;

  Console.WriteLine(bitmapFont.Info.Face);

  bitmapFont.Info.Face = "New Name";

  bitmapFont.Save("ExampleFont2.fnt", FormatHint.Binary);
}

Documentation

See the documentation for BMFont for information on rendering text and the properties of the file format.

License

Licensed under MIT.

About

A Beef library for reading and writing AngelCode bitmap fonts in binary, XML, and text.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages