.FON Windows Bitmap Font
.fon

Windows Bitmap Font

A FON file is a legacy Windows bitmap font that stores pre-rasterized character glyphs at fixed pixel sizes inside an NE (New Executable) container. Standard from Windows 1.0 through XP, FON files cannot scale smoothly and have been replaced by TrueType and OpenType fonts.

بنية الصيغة
Header table directory
Tables glyf · cmap
Outlines glyph paths
Binary NE containerBitmap raster fontFixed pixel sizesMZ/NE magic bytesWindows legacy
بواسطة FileDex
غير قابل للتحويل

Legacy bitmap font format. Conversion requires glyph extraction and repackaging not available in browser.

أسئلة شائعة

What is a FON file and why does it look like an executable?

FON files use the Windows NE (New Executable) format, the same binary container used by 16-bit Windows programs. The NE format acts purely as a resource archive holding FONT resources; FON files contain no executable code.

Can I use FON fonts on macOS or Linux?

Not natively. Convert the FON to TTF using FontForge (File > Open, then File > Generate Fonts > TrueType). The resulting TTF works on any OS, though some bitmap accuracy may be lost.

FON vs TTF — which is better for pixel fonts?

For pixel-perfect retro rendering at specific small sizes, FON is superior. For modern use, a TTF with embedded bitmap strikes (EBDT/EBLC tables) combines outline scalability with pixel-perfect bitmaps at target sizes.

How do I install a FON font on Windows 10 or Windows 11?

Right-click the FON file and select 'Install' or 'Install for all users'. Alternatively, copy the file to C:\Windows\Fonts. Windows 10 and 11 still support FON installation through GDI, though the installer may display a compatibility warning. After installation, the font appears in legacy GDI applications but may not be available in DirectWrite-based modern apps.

FON vs TTF — which is better for pixel fonts and terminal emulators?

For pixel-perfect retro rendering at specific small sizes (8px, 9px, 10px, 12px), FON is technically superior because each glyph is a pre-drawn bitmap — there is no rasterization and no anti-aliasing. However, modern terminal emulators typically prefer TTF or OTF fonts with embedded bitmap strikes (EBDT/EBLC tables), which combine outline scalability with pixel-perfect bitmaps at target sizes. For a new project, use a TTF with embedded bitmaps rather than FON.

How do I convert a FON file to TTF?

Open the FON file in FontForge, then go to File → Generate Fonts and choose TrueType (.ttf) as the output format. For bulk conversion, FontForge supports scripting: `fontforge -lang=ff -c 'Open($1); Generate($1:r + ".ttf")' myfont.fon`. The Bits'N'Picas editor also supports FON-to-TTF conversion with better control over the resulting metrics.

ما يميز .FON

What is a FON file?

FON is a Windows font resource file that contains one or more bitmap (raster) fonts. Unlike TrueType or OpenType fonts, FON fonts are rendered from pre-drawn pixel patterns at specific sizes, meaning they cannot be smoothly scaled. FON files use the Windows NE (New Executable) format — the same binary container used by 16-bit Windows programs — and were standard from Windows 1.0 through Windows XP.

اكتشف التفاصيل التقنية

The deceptive detail about FON files is their container format: they begin with an MZ DOS header (identical to .exe and .dll files) and contain an NE (New Executable) header, which is why the operating system and many tools may report them as executable files. They hold no executable code — the NE container is purely acting as a resource archive for FONT and FONTDIR resource types.

How to open FON files

  • Windows Font Viewer (Windows) — Double-click to preview and install
  • Windows Fonts folder — Install by copying to C:\Windows\Fonts (requires Administrator)
  • FontForge (Windows, macOS, Linux) — Free font editor; can open, inspect, and convert FON files
  • Resource Hacker (Windows) — Inspect and extract individual FONT resource entries from the NE container
  • Bits'N'Picas (Windows, macOS, Linux) — Modern bitmap font editor with FON support

Technical specifications

Property Value
Type Bitmap (raster) font
Container NE (New Executable) resource container
Magic bytes 4D 5A (MZ header) at offset 0; 4E 45 (NE) at offset stored in 0x3C
Scaling Fixed pixel sizes only — no outline data
Character sets ANSI (Windows-1252), OEM (CP437/CP850), Symbol
Resource types FONTDIR (0x0007) + FONT (0x0008)

Internal structure

A FON file is an NE-format binary with two key resource types:

  • FONTDIR (resource type 7) — A directory listing all font variants in the file, indexed by point size and display resolution (72 DPI for screen, 120 DPI for high-resolution displays).
  • FONT (resource type 8) — One entry per size/weight variant, containing: a header with character metrics (width, height, ascent, descent), a width table with per-character advance widths, and the raw bitmap glyph data packed as 1-bit-per-pixel rows.

This structure allows a single .fon file to contain a complete font family at multiple sizes — for example, the classic coure.fon contains Courier at 10pt, 12pt, and 15pt for different display resolutions.

Common use cases

  • Legacy systems: Windows XP and earlier UI system fonts — MS Sans Serif, MS Serif, Courier, Small Fonts, and Fixedsys were all distributed as FON files
  • Terminal emulators: Fixed-size console fonts with pixel-exact character grids
  • Retro computing: Recreating classic Windows 3.x and DOS aesthetics in emulators or modern apps
  • Embedded displays: Low-resolution fixed-size text on microcontrollers and dot-matrix displays that use the Windows FON format for their font tables

Converting FON to TTF

The most practical path for using a FON font on modern systems is converting it to TrueType:

  1. Open FontForge and choose File → Open, select your .fon file
  2. FontForge will detect the bitmap strikes at each size
  3. Choose File → Generate Fonts, select TrueType (.ttf) as format
  4. Optionally use Element → Auto Trace to generate outline paths from the bitmaps (results vary)

For pixel fonts intended for screen use, keeping the result as bitmap-only TTF (using the EBDT/EBLC embedded bitmap tables) gives cleaner results than auto-tracing.

المرجع التقني

نوع MIME
application/octet-stream
Magic Bytes
4D 5A MZ PE header wrapping bitmap font data.
المطوّر
Microsoft
سنة التقديم
1985
معيار مفتوح
لا
000000004D5A MZ

MZ PE header wrapping bitmap font data.

البنية الثنائية

FON files use the NE (New Executable) container format, beginning with a DOS MZ header followed by an NE header. The NE resource table contains FONTDIR (type 0x0007) entries listing font variants and FONT (type 0x0008) entries holding the actual bitmap glyph data at each size.

OffsetLengthFieldExampleDescription
0x00 2 bytes MZ Magic 4D 5A DOS MZ header signature — same as Windows EXE/DLL; FON reuses the NE container
0x3C 4 bytes NE Header Offset variable Little-endian DWORD pointing to the NE header within the file
NE+0x00 2 bytes NE Signature 4E 45 New Executable format signature (ASCII 'NE')
NE+0x24 2 bytes Resource Table Offset variable Offset to the resource table containing FONTDIR and FONT entries
1985FON format introduced with Windows 1.0; system fonts including MS Sans Serif distributed as FON1990Windows 3.0 expands FON usage; Courier, MS Serif, Small Fonts all ship as .fon files1992TrueType introduced in Windows 3.1; FON retained for system UI fonts alongside TTF1995Windows 95 ships with both FON system fonts and TrueType; FON used for pixel-accurate UI elements2001Windows XP retains FON fonts for GDI compatibility; ClearType introduced for TTF rendering2007Windows Vista introduces DirectWrite; FON fonts deprecated for modern rendering but still functional via GDI
Convert FON to TTF with FontForge (scripted) أخرى
fontforge -lang=ff -c 'Open($1); Generate($1:r + ".ttf")' myfont.fon

Converts a FON bitmap font to TrueType using FontForge's scripting interface. The output TTF will contain bitmap strikes from the original FON.

Extract FONT resources with Resource Hacker (CLI) أخرى
ResourceHacker.exe -open myfont.fon -save extracted.fnt -action extract -mask FONT,,

Extracts individual FONT resource entries from a FON container using Resource Hacker's command-line mode.

Inspect FON NE header with xxd أخرى
xxd myfont.fon | head -4

Displays the first 64 bytes of a FON file in hex. The MZ signature (4D 5A) at offset 0 and the NE signature (4E 45) at the offset stored at 0x3C confirm a valid NE-format FON file.

FON TTF render near-lossless Convert bitmap font to TrueType for cross-platform use on modern systems
FON BDF export lossless Export to BDF bitmap format for use on Unix/Linux X11 systems
منخفض

نقاط الضعف

  • Font parsing vulnerabilities in legacy GDI subsystem

الحماية: FileDex does not open, execute, or parse these files. Reference page only.

Windows Font Viewer أداة
Built-in Windows tool for previewing and installing FON fonts
FontForge أداة
Free open-source font editor that can open and convert FON files
Resource Hacker أداة
Windows resource editor for extracting FONT resources from NE binaries
Bits'N'Picas أداة
Modern bitmap font editor with FON import/export support
BDF2FON أداة
Command-line converter for BDF bitmap fonts to Windows FON format