kestell.org

Home / Projects / BdfNet

BdfNet

BdfNet is a .NET library for loading Glyph Bitmap Distribution Format (BDF) fonts.

Example

var font = BdfFont.Load("courR14.bdf");
var aChar = font.Characters[0x61];

for (var row = 0; row < aChar.Height; row++)
{
    for (var col = 0; col < aChar.Width; col++)
    {
        Console.Write(aChar.Bitmap[row, col] == 1 ? "*" : " ");
    }
    Console.WriteLine();
}

Output

  ***  
 *   * 
     * 
 ***** 
*    * 
*    * 
 **** *

Source

The source code for BdfNet is available on GitHub.

License

BdfNet uses the Zero-Clause BSD license.