Clever Geek Handbook
📜 ⬆️ ⬇️

Bitmap distribution format

Bitmap Distribution Format (BDF) is an Adobe -created file format for storing bitmap fonts. The contents of the file are presented in text form, readable for both a person and a computer. Typically, BDF is used in UNIX environments.

Content

  • 1 Introduction
  • 2 Keywords
  • 3 Example
  • 4 Literature
  • 5 Links

Introduction

The latest version of the format is 2.2. No new versions are expected.

The X Windows Consortium has adopted BDF 2.1 as the font standard for the X Windows system , but is now moving toward other standards.

The BDF file contains 3 sections:

  • Global section applied to all font glyphs
  • Glyph Section
  • ENDFONT instruction

Keywords

Keywords and optionsDescription
Global section
STARTFONT numberSpecifies the version of the BDF file. number - version (for example 2.1 ).
COMMENT stringComment line More than one comment is allowed. Such lines will be ignored by the file handler.
CONTENTVERSION integerOptional keyword, sets the font version.
Font stringSpecifies the font name
SIZE PointSize Xres Yres
FONTBOUNDINGBOX FBBx FBBy Xoff YoffFBBx , FBBy - font width and height, respectively. Xoff , Yoff - offset of the lower left corner of the font along the X and Y axis, respectively, relative to the origin.
METRICSSET integer
STARTPROPERTIES nThe optional keyword sets the top of the property list. Each property has a row. Total n lines.
ENDPROPERTIESThe optional keyword sets the end of the property list. Used in conjunction with STARTPROPERTIES.
Glyph Section
Char nglyphsnglyphs - number of glyphs in the glyph section
STARTCHAR stringstring - glyph name
ENCODING integer (integer)Code and alternate glyph code (in brackets)
SWIDTH swx0 swy0
DWIDTH dwx0 dwy0
SWIDTH1 swx1 swy1
DWIDTH1 dwx1 dwy1
VVECTOR xoff yoff
BBX BBw BBh BBxoff0x BByoff0yPixel size and glyph position
BBw - Glyph Width
BBh - glyph height
BBxoff0x and BByoff0y - offset of the lower left corner of the glyph along the X and Y axis, respectively, from the origin
BITMAP <hex data>Bitmap
EndcharEnd glyph description
EndfontFont Description End

Example

This sample font contains one glyph - the ASCII capital letter "A". Symbol taken from GNU Unifont .

  STARTFONT 2.1
 FONT -gnu-unifont-medium-r-normal - 16-160-75-75-c-80-iso10646-1
 SIZE 16 75 75
 FONTBOUNDINGBOX 16 16 0 -2
 STARTPROPERTIES 2
 FONT_ASCENT 14
 FONT_DESCENT 2
 ENDPROPERTIES
 CHARS 1
 STARTCHAR U + 0041
 ENCODING 65
 SWIDTH 500 0
 DWIDTH 8 0
 BBX 8 16 0 -2
 Bitmap
 00
 00
 00
 00
 eighteen
 24
 24
 42
 42
 7E
 42
 42
 42
 42
 00
 00
 Endchar
 Endfont

Literature

  • Haralambous, Y. and Horne, PS Fonts & Encodings. - O'Reilly Media, 2007 .-- P. 606-609. - 1016 p. - ISBN 9780596102425 .
  • Murray, JD and VanRyper, W. Encyclopedia of graphics file formats. - O'Reilly & Associates, 1996 .-- P. 310-1314. - 1116 p. - ISBN 9781565921610 .

Links

  • Adobe Glyph Bitmap Distribution Format (BDF) Specification, Version 2.2
Source - https://ru.wikipedia.org/w/index.php?title=Bitmap_Distribution_Format&oldid=92542184


More articles:

  • Tantardini Antonio
  • Ludum Dare
  • Our town
  • Khatib, Zaki
  • Gabrichevsky, George Norbertovich
  • Svyatoslav Rostislavich (Prince of Novgorod)
  • Akimov, Andrey Igorevich
  • Symphony No. 1 (Brahms)
  • Antonov, Anton Antonovich
  • Symphony No. 2 (Brahms)

All articles

Clever Geek | 2019