SHX File Documentation


Summary

An AutoCAD compiled shape/font file is a binary definition of symbols and font glyphs that AutoCAD uses to draw custom text styles and shapes in a drawing. You do not open a .shx directly: it is a resource referenced by a DWG, loaded from AutoCAD’s Fonts or support-path folder. Its MIME type is application/octet-stream. The usual reason people look it up is the AutoCAD warning “One or more SHX files are missing”; the fix is to place the referenced .shx in AutoCAD’s support path and reopen the drawing.

Technical details

FeatureValue
Full nameAutoCAD compiled shape/font file
File extension.shx
MIME typeapplication/octet-stream
Format typeBinary compiled shape/font definition
DeveloperAutodesk
IntroducedAutoCAD shape/font system, 1980s
Compiled from.shp shape source, or a PostScript Type 1 (.pfb) font
Compiled byAutoCAD COMPILE command
HeaderASCII string, e.g. AutoCAD-86 shapes 1.0 / ...unifont 1.0
ContentsCompiled vector shape and glyph definitions + lookup index
Used byDrawings (.dwg) that reference the font/shape
Open standardNo — proprietary Autodesk format
Opened directlyNo — placed in AutoCAD’s Fonts / support path
Also-used-byEsri shapefile index (unrelated GIS format, same extension)
Compatible appsAutoCAD, BricsCAD, GstarCAD, ZWCAD
Related extensions.shp, .dwg, .pfb, .ttf, .fon
Specificationhelp.autodesk.com (About Shape Descriptions)
File signature (magic bytes)
41 75 74 6F 43 41 44 2D 38 36

Offset 0, ASCII AutoCAD-86. An AutoCAD compiled shape/font file starts with a readable identification string such as AutoCAD-86 shapes 1.0 or AutoCAD-86 unifont 1.0, followed by the binary compiled shape and glyph definitions. The version and type words in that string tell AutoCAD whether the file is a shape file or a font (unifont) file. Do not confuse this with the unrelated Esri GIS shapefile index, which also uses .shx but instead begins with the big-endian file code 00 00 27 0A (decimal 9994) and belongs in GIS software, not AutoCAD.

What is a SHX file?

In AutoCAD, an .shx is a compiled shape/font file: a binary definition of vector symbols and font glyphs that AutoCAD uses to draw custom text styles and shapes inside a drawing. The shape system goes back to AutoCAD in the 1980s and was Autodesk’s way of storing compact, reusable vector definitions long before TrueType. An .shx is not a drawing and not a document you open; it is a resource that a DWG file references, and AutoCAD loads it from its Fonts folder or its support file search path when it needs to render text or symbols in that style.

There are two flavours of the same format. An SHX font supplies the glyphs for one of AutoCAD’s custom text styles; an SHX shape supplies reusable symbols you can insert into drawings by shape number. Both are compiled from a plain-text source and both are consumed the same way, by being present where AutoCAD can find them.

From SHP shape source to compiled SHX

An .shx is always the compiled output of a source file. That source is a .shp shape definition file, a plain-text description of each shape or glyph. Note that this AutoCAD shape .shp is a completely different thing from the Esri GIS shapefile that shares the extension; here it is an AutoCAD shape source. A shape source describes each entry with a header line naming the shape and then one or more lines of specification bytes:

*shapenumber,defbytes,shapename
  spec-byte,spec-byte,...,0

*1,7,MYARROW
  024,010,01C,014,012,010,0

Each shape has a header line (its number, the count of definition bytes, and a name) followed by comma-separated specification bytes that are a compact vector language: pen up/down moves in one of 16 directions and lengths, arcs, and control codes, terminated by a 0. If the file is meant as a font, the very first entry describes the font itself (line height and orientation) rather than a drawable shape; if that first entry is an ordinary shape, the file is treated as a shape file. Compiling that .shp in AutoCAD with the COMPILE command produces an .shx of the same name, which is what AutoCAD actually loads at draw time.

Inside the compiled file: header, definitions, index

A compiled .shx begins with a readable ASCII identification string, then holds binary data. The string is the quickest way to recognise the file and its type:

"AutoCAD-86 shapes 1.0\r\n\x1A"     a shape file
"AutoCAD-86 unifont 1.0\r\n\x1A"    a Unicode font file
  <binary>  compiled shape / glyph definitions
  <binary>  index mapping shape numbers / character codes -> definitions

After the identifier come the compiled shape or glyph definitions, the vector instructions from the source turned into a compact binary form for fast rendering, plus an index that maps each shape number or character code to the offset of its definition, so AutoCAD can jump straight to the glyph it needs. The unifont variant exists specifically to carry the wider character set required for Unicode text. Because the format is proprietary and compiled, you view the shapes by loading the .shx in AutoCAD, not by reading the binary; if you need to change a shape, you edit the .shp source and recompile, since there is no clean decompile back to source.

The “One or more SHX files are missing” error

The single most common encounter with .shx is the AutoCAD warning “One or more SHX files are missing” when opening a drawing. It means the .dwg references a shape or font file that is not installed on this machine, so the text or symbols cannot render in their intended style, they appear substituted, wrong, or as boxes. The reference is by filename: the drawing records that it needs, say, romans.shx, but does not embed it.

The fix follows from how AutoCAD resolves the reference. Obtain the named .shx from the drawing’s author or a trusted CAD source and place it either in AutoCAD’s Fonts folder or in any folder on the support file search path (set under Options), then reopen the drawing so the font resolves. Alternatively, accept AutoCAD’s prompt to substitute another font, which keeps the drawing usable at the cost of exact appearance. AutoCAD-compatible applications, BricsCAD, GstarCAD, ZWCAD, consume SHX fonts and shapes the same way, so the same “drop it in the fonts/support folder” fix applies there.

A different .shx: the Esri shapefile index

The .shx extension is reused by an unrelated format, and mixing them up causes a specific error. In GIS, .shx is the Esri shapefile index, a spatial index that always travels alongside a .shp geometry file and a .dbf attribute table of the same name. That file is opened as part of the shapefile in QGIS or ArcGIS, and you open the .shp, never the .shx on its own. It has nothing to do with AutoCAD shapes; it even starts with a different signature (the big-endian file code 9994) rather than the AutoCAD-86 string. If you feed a GIS index to AutoCAD you will see “filename.shx is a normal text font file, not a shape file”, which is AutoCAD’s way of telling you the file is not one of its compiled shapes. Use that file in GIS software instead.

Why an SHX font is not a TrueType font

People sometimes want to turn an .shx font into a system TrueType (.ttf) font, and it does not convert cleanly. An SHX font is a compiled shape definition, a set of pen-stroke vector instructions, not the quadratic outline curves a TrueType glyph is built from. A few niche tools attempt the conversion, but the result is approximate at best because the two describe glyphs in fundamentally different ways. The reliable approach is to keep using the matching .shx inside AutoCAD rather than trying to install it as an operating-system font. As passive compiled data, an .shx is safe to install; the only practical caution is that “free SHX font” download sites sometimes bundle adware, so get CAD fonts from the drawing’s author or a trusted CAD source.

References