zpl.tools
CommandsFont text

~DB - Download Bitmapped Font

Downloads bitmap fonts to printer memory

~DB - Download Bitmapped Font

Overview

The ~DB command sets the printer to receive a downloaded bitmap font and defines the native cell size, baseline, space size, and copyright information. Bitmap fonts are pixel-based fonts with fixed sizes that are stored in printer memory. This instruction consists of a ZPL II command that defines font parameters and a structured data segment that defines each character.

Syntax

~

Parameters

  • d = Destination device
    • R: = DRAM (default, always used for bitmap fonts)
  • o = Font name (1-8 alphanumeric characters, default: Unknown)
  • x = Extension (.FNT, fixed)
  • a = Orientation
    • N = Normal (0°, default)
    • R = 90° clockwise
    • I = 180°
    • B = 270° (Note: Only N is currently supported)
  • h = Maximum height of cell in dots
  • w = Maximum width of cell in dots
  • base = Dots from top of cell to character baseline
  • space = Width of space character in dots
  • #char = Number of characters in font (must match number of character definitions)
  • © = Copyright holder (max 63 characters)
  • DATA = Character definitions (structured format shown below)

Character Definition Format

#xxxx.h.w.x.y.i.hexdata
  • #xxxx = Character code (1-4 characters for international sets)
  • h = Bitmap height in dots
  • w = Bitmap width in dots
  • x = X-offset in dots
  • y = Y-offset in dots
  • i = Typesetting motion (width including gap)
  • hexdata = HEX bitmap data

Description

  • Downloads custom bitmap fonts to printer DRAM
  • Enables use of custom fonts not in the printer's standard font library
  • Fonts are pixel-based with fixed sizes
  • Cannot be scaled without loss of quality
  • Requires character-by-character definition
  • Resolution-dependent (looks different at different DPI)

Usage Notes

  • Bitmap fonts always stored in DRAM (R:)
  • Extension is always .FNT and cannot be changed
  • Currently only Normal (N) orientation is supported
  • Character count must match number of definitions
  • Copyright holder can be up to 63 characters
  • Character codes support international character sets (1-4 characters)
  • Consume more memory than scalable fonts at multiple sizes

Example

~
  • ~DS - Download Scalable Font
  • ~DT - Download TrueType Font
  • ~DU - Download Unbounded Unicode TrueType Font
  • ^A - Scalable/Bitmapped Font (select font for use)
  • ^CW - Font Identifier
  • ^CF - Change Alphanumeric Default Font

See Also