Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

FonLibrary

FON Vector/Bitmap Library for Free Pascal and Turbo Pascal

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

ROMAN

(Create your own fonts with my Font Editors or convert from TTF fonts)

Windows FON Font Reader Library for Free Pascal & Turbo Pascal By RetroNick - Code Released Dec 17 - 2025

Enhanced version with:

  • Text rotation (0°, 90°, 180°, 270°)
  • Vertical text direction
  • BGI-compatible helper functions (OutTextXY, SetTextStyle, SetTextJustify, etc.)

Supports:

  • Windows 2.x/3.x NE format FON files
  • Both raster (bitmap) and vector (stroke) fonts
  • Scalable rendering for vector fonts

Usage: uses WinFont, PTCGraph;

pascal
var
  Font: TWinFont;
begin
  Font := TWinFont.Create;
  if Font.LoadFromFile('ROMAN.FON') then
  begin
    Font.Scale := 2.0;  // Scale factor for vector fonts
    Font.Rotation := rot90;  // Rotate 90 degrees
    Font.DrawText(100, 100, 'Hello World!');
pascal
// Or use BGI-style functions
Font.SetTextJustify(CenterText, CenterText);
Font.OutTextXY(400, 300, 'Centered Text');
pascal
end;
Font.Free;
pascal
end;