CGM


The CGM format, or Computer Graphics Metafile format, is used by the drafting and design industry because of its elegant handling of graphical primitives, and by the oil and gas industry because of its seismic extension (not supported in ZEHRaster Plus) which allows seismic data to be incorporated into the CGM and stored, printed, and viewed.

The format is popular for several reasons:

The CGM standard was originally published by the American National Standards Institute in 1986, published again in 1987 by the International Organization for Standardization (ISO), and continues to evolve. The current CGM standard is ISO 8632:1992.

The CGM standard is upheld by the National Institute of Standards and Technology (NIST), which is responsible for determining whether the file output from a CGM product conforms to the CGM standard. The CGM standard has a number of profiles or test suites, including the ATA (Air Transport Association) profile, which is a superset of the CALS (Continuous Acquisition and Life-cycle Support, developed by the Department of Defense) test suite, and the PIP (Petroleum Industry Profile) profile.

For a detailed discussion of the Computer Graphics Metafile, refer to The CGM Handbook, by Lofton R. Henderson and Anne M. Mumford (ISBN 0-12-510560-6).

ZEHRaster Plus supports CGM-ATA and CGM-CALS files, as well as binary-encoded CGM files.

CGM Specifics

Color Mode

Scaling Mode

A CGM may be in either abstract scaling mode or metric scaling mode.

Abstract scaling mode CGMs do not have an actual physical size that can be measured in inches, millimeters, or pixels. Its units of measure are "virtual device coordinates" or VDCs, meaning that they can be mapped to any physical measurement desired.

Metric scaling mode CGMs have a physical size measured in millimeters.

ZEHRaster Plus can handle either mode. If a file is abstract scaling mode, the size is set to the width of the HP DesignJet printer being used. If a file is metric scaling mode, the physical units are read from the file itself.

Fonts and Text

CGMs can contain text strings and use particular fonts to render the text. A valid CGM will include a font list that defines the names of the font to use for the text strings. More than one font can be used in the CGM.

ZEHRaster Plus uses a font.aliases file, stored in the ZEH Program directory, which is used to map the names of fonts that appear in the font list with names of fonts provided by ZEH. If an exact match between the name used in the font list element and the font list supported by ZEH is not possible, ZEHRaster Plus will substitute the ZEH font closest in name to the CGM font name.

If the fonts that appear on the CGMs output by ZEHRaster Plus are not correct, you may be able to correct the font usage by changing the font mappings included in the font.aliases file in the installation directory.

A font.aliases entry appears as:

Helvetica=CG: Triumvirate

The font listed on the left (Helvetica) is the font used in the CGM, and the font listed on the right (CG: Triumvirate) is the font that should be used.

The font.aliases file may be edited with a text editor.

Several fonts are provided.

Hershey Fonts

  • Hershey: Simplex_Roman
  • Hershey: Simplex_Script
  • Hershey: Simplex_Greek
  • Hershey: Duplex_Roman
  • Hershey: Complex_Roman
  • Hershey: Complex_Script
  • Hershey: Complex_Greek
  • Hershey: Complex_Italic
  • Hershey: Complex_Cyrillic
  • Hershey: Triplex_Roman
  • Hershey: Triplex_Italic
  • Hershey: Gothic_German
  • Hershey: Gothic_Italian
  • Hershey: Symbol_1
  • Hershey: Symbol_2
  • Hershey: Symbol_3
  • Hershey: Symbol_4
  • Hershey: Symbol_5
  • Hershey: Symbol_6
  • Hershey: Symbol_7
  • Hershey: Simplex_Roman_Monospace

ZEH Fonts for NIST compliance

  • CG: Triumvirate
  • CG: Triumvirate Italic
  • CG: Triumvirate Bold
  • CG: Triumvirate Bold Italic
  • CG: Times
  • CG: Times Italic
  • CG: Times Bold
  • CG: Times Bold Italic
  • CG: Courier
  • CG: Courier Oblique
  • CG: Courier Bold
  • CG: Courier Bold Oblique
  • CG: Symbol
  • CG: Triumvirate Condensed
  • CG: Triumvirate Condensed Italic
  • CG: Triumvirate Bold Condensed
  • CG: Triumvirate Bold Condensed Italic